public class DirectBufferOutputStream extends 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 OutputStream
b
- to be written.IllegalStateException
- if insufficient capacity remains in the buffer.public void write(byte[] srcBytes, int srcOffset, int length)
write
in class OutputStream
srcBytes
- to writesrcOffset
- at which to begin reading bytes from the srcBytes.length
- of the srcBytes to read.IllegalStateException
- if insufficient capacity remains in the buffer.public void write(byte[] srcBytes)
write
in class OutputStream
srcBytes
- to writeIllegalStateException
- if insufficient capacity remains in the buffer.public void flush()
IOException
. This method does nothing.flush
in interface Flushable
flush
in class OutputStream
public void close()
IOException
. This method does nothing.close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
Copyright © 2014-2020 Real Logic Limited. All Rights Reserved.