public class EnhancedByteArrayOutputStream extends java.io.ByteArrayOutputStream implements RandomAccessOutputStream
| Constructor and Description |
|---|
EnhancedByteArrayOutputStream() |
| Modifier and Type | Method and Description |
|---|---|
ByteArraySegment |
getData()
Returns a readonly ByteArraySegment wrapping the current buffer of the ByteArrayOutputStream.
|
java.io.OutputStream |
subStream(int streamPosition,
int length)
Creates a new fixed-size OutputStream starting at the given position in this OutputStream and of the given length.
|
void |
write(byte[] array) |
void |
write(byte[] buffer,
int bufferOffset,
int length,
int streamPosition)
Writes a sequence of bytes at the given position.
|
void |
write(int byteValue,
int streamPosition)
Writes the given byte value at the given position.
|
close, reset, size, toByteArray, toString, toString, toString, write, write, writeToclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsizepublic ByteArraySegment getData()
public void write(byte[] array)
write in class java.io.OutputStreampublic void write(int byteValue,
int streamPosition)
RandomAccessOutputStreamwrite in interface RandomAccessOutputStreambyteValue - The value to write.streamPosition - The position to write at.public void write(byte[] buffer,
int bufferOffset,
int length,
int streamPosition)
RandomAccessOutputStreamwrite in interface RandomAccessOutputStreambuffer - The buffer to write from.bufferOffset - The offset within the buffer to start at.length - The number of bytes to write.streamPosition - The position within the OutputStream to write at.public java.io.OutputStream subStream(int streamPosition,
int length)
RandomAccessOutputStreamsubStream in interface RandomAccessOutputStreamstreamPosition - The position to start at.length - The length of the OutputStream.