public class DirectBytesBufferedOutputStream extends AbstractBufferedOutputStream
BufferedOutputStream
DEFAULT_BUFFER_SIZE
out
Constructor and Description |
---|
DirectBytesBufferedOutputStream(OutputStream out)
Creates a new instance with the default buffer size
|
DirectBytesBufferedOutputStream(OutputStream out,
int size)
Creates a new instance with the given buffer size in bytes.
|
DirectBytesBufferedOutputStream(OutputStream out,
int size,
boolean useNativeByteOrder)
Creates a new instance with the given buffer size in bytes.
|
DirectBytesBufferedOutputStream(OutputStream out,
int size,
ByteOrder byteOrder)
Creates a new instance with the given buffer size in bytes.
|
Modifier and Type | Method and Description |
---|---|
protected byte[] |
bytes()
Return the bytes in the buffer as a byte array
|
protected void |
clean()
Performs any necessary cleaning of the buffer and releasing of resources.
|
protected int |
limit()
Returns the limit of the buffer
|
protected void |
put(byte b)
Put a single byte into the buffer
|
protected void |
put(int count,
byte[] b,
int off,
int len)
Puts bytes into the buffer
|
close, flush, write, write
write
public DirectBytesBufferedOutputStream(OutputStream out)
out
- OutputStream to be decoratedBufferedOutputStream.BufferedOutputStream(OutputStream)
public DirectBytesBufferedOutputStream(OutputStream out, int size)
out
- OutputStream to be decoratedsize
- The size of the buffer in bytesBufferedOutputStream.BufferedOutputStream(OutputStream, int)
public DirectBytesBufferedOutputStream(OutputStream out, int size, boolean useNativeByteOrder)
out
- OutputStream to be decoratedsize
- The size of the buffer in bytesuseNativeByteOrder
- If true, native byte ordering will be usedBufferedOutputStream.BufferedOutputStream(OutputStream, int)
public DirectBytesBufferedOutputStream(OutputStream out, int size, ByteOrder byteOrder)
out
- OutputStream to be decoratedsize
- The size of the buffer in bytesbyteOrder
- Indicates the byte order to be used.BufferedOutputStream.BufferedOutputStream(OutputStream, int)
protected byte[] bytes()
AbstractBufferedOutputStream
bytes
in class AbstractBufferedOutputStream
protected void put(byte b)
AbstractBufferedOutputStream
put
in class AbstractBufferedOutputStream
b
- The byteprotected void put(int count, byte[] b, int off, int len)
AbstractBufferedOutputStream
put
in class AbstractBufferedOutputStream
count
- The number of bytes already written into the bufferb
- The byte array with the bytes to putoff
- Offset to write from in the bytes, blen
- The number of bytes to writeprotected int limit()
AbstractBufferedOutputStream
limit
in class AbstractBufferedOutputStream
protected void clean()
AbstractBufferedOutputStream
clean
in class AbstractBufferedOutputStream
Copyright © 2010–2018 Jadira Systems. All rights reserved.