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.
|
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,
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) throws java.io.IOException
write
in class java.io.OutputStream
b
- to be written.java.lang.IllegalStateException
- if insufficient capacity remains in the buffer.java.io.IOException
public void write(byte[] srcBytes, int srcOffset, int length) throws java.io.IOException
write
in class java.io.OutputStream
srcBytes
- 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.java.io.IOException
Copyright © 2014-2017 Real Logic Ltd. All Rights Reserved.