public class StreamingOutputStream extends OutputStream
OutputStream adapter that writes its bytes to a
StreamingDataOutput. This allows Chronicle Bytes streams to be used
where a standard OutputStream is required.| Constructor and Description |
|---|
StreamingOutputStream()
Constructs a new StreamingOutputStream instance and initializes the data destination as an empty ByteStore.
|
StreamingOutputStream(StreamingDataOutput sdo)
Constructs a new StreamingOutputStream instance with a specific StreamingDataOutput as the data destination.
|
| Modifier and Type | Method and Description |
|---|---|
@NotNull StreamingOutputStream |
init(StreamingDataOutput sdo)
Initializes this StreamingOutputStream instance with a specific StreamingDataOutput as the data destination.
|
void |
write(byte[] b,
int off,
int len)
Writes bytes from the given array to the underlying
StreamingDataOutput. |
void |
write(int b)
Writes a single byte value.
|
close, flush, writepublic StreamingOutputStream()
public StreamingOutputStream(StreamingDataOutput sdo)
sdo - the StreamingDataOutput instance to write data to.@NotNull public @NotNull StreamingOutputStream init(StreamingDataOutput sdo)
sdo - the StreamingDataOutput instance to write data to.public void write(byte[] b,
int off,
int len)
throws IOException
StreamingDataOutput.
Any BufferOverflowException, IllegalArgumentException or
IllegalStateException from the target is wrapped in an
IOException.write in class OutputStreamIOExceptionpublic void write(int b)
throws IOException
StreamingDataOutput are wrapped in an IOException.write in class OutputStreamIOExceptionCopyright © 2026 Chronicle Software Ltd. All rights reserved.