public class DirectBufferOutputStream
extends java.io.OutputStream
OutputStream that wraps an underlying MutableDirectBuffer.| Constructor and Description |
|---|
DirectBufferOutputStream() |
DirectBufferOutputStream(MutableDirectBuffer buffer) |
DirectBufferOutputStream(MutableDirectBuffer buffer,
int offset,
int length) |
| Modifier and Type | Method and Description |
|---|---|
MutableDirectBuffer |
buffer()
The underlying buffer being wrapped.
|
void |
close()
Override to remove
IOException. |
void |
flush()
Override to remove
IOException. |
int |
length()
The length of the underlying buffer to use
|
int |
offset()
The offset within the underlying buffer at which to start.
|
int |
position()
The position in the buffer from the offset up to which has been written.
|
void |
wrap(MutableDirectBuffer buffer) |
void |
wrap(MutableDirectBuffer buffer,
int offset,
int length) |
void |
write(byte[] srcBytes)
Write a byte[] to the buffer.
|
void |
write(byte[] srcBytes,
int srcOffset,
int length)
Write a byte[] to the buffer.
|
void |
write(int b)
Write a byte to buffer.
|
public DirectBufferOutputStream()
public DirectBufferOutputStream(MutableDirectBuffer buffer)
public DirectBufferOutputStream(MutableDirectBuffer buffer, int offset, int length)
public void wrap(MutableDirectBuffer buffer)
public void wrap(MutableDirectBuffer buffer, int offset, int length)
public int position()
public int offset()
public MutableDirectBuffer buffer()
public int length()
public void write(int b)
write in class java.io.OutputStreamb - to be written.java.lang.IllegalStateException - if insufficient capacity remains in the buffer.public void write(byte[] srcBytes,
int srcOffset,
int length)
write in class java.io.OutputStreamsrcBytes - to writesrcOffset - at which to begin reading bytes from the srcBytes.length - of the srcBytes to read.java.lang.IllegalStateException - if insufficient capacity remains in the buffer.public void write(byte[] srcBytes)
write in class java.io.OutputStreamsrcBytes - to writejava.lang.IllegalStateException - if insufficient capacity remains in the buffer.public void flush()
IOException. This method does nothing.flush in interface java.io.Flushableflush in class java.io.OutputStreampublic void close()
IOException. This method does nothing.close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamCopyright © 2014-2019 Real Logic Ltd. All Rights Reserved.