public class OutputStreamBufferOutput extends java.lang.Object implements MessageBufferOutput
OutputStream.| Constructor and Description |
|---|
OutputStreamBufferOutput(java.io.OutputStream out) |
OutputStreamBufferOutput(java.io.OutputStream out,
int bufferSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(byte[] buffer,
int offset,
int length)
Writes an external payload data.
|
void |
close() |
void |
flush() |
MessageBuffer |
next(int mimimumSize)
Allocates the next buffer for writing message packed data.
|
java.io.OutputStream |
reset(java.io.OutputStream out)
Reset Stream.
|
void |
write(byte[] buffer,
int offset,
int length)
Writes an external payload data.
|
void |
writeBuffer(int length)
Flushes the previously allocated buffer.
|
public OutputStreamBufferOutput(java.io.OutputStream out)
public OutputStreamBufferOutput(java.io.OutputStream out,
int bufferSize)
public java.io.OutputStream reset(java.io.OutputStream out)
throws java.io.IOException
out - new streamjava.io.IOExceptionpublic MessageBuffer next(int mimimumSize) throws java.io.IOException
MessageBufferOutputnext in interface MessageBufferOutputmimimumSize - the mimium required buffer size to allocatejava.io.IOExceptionpublic void writeBuffer(int length)
throws java.io.IOException
MessageBufferOutputwriteBuffer in interface MessageBufferOutputlength - the size of buffer to flushjava.io.IOExceptionpublic void write(byte[] buffer,
int offset,
int length)
throws java.io.IOException
MessageBufferOutputwrite in interface MessageBufferOutputbuffer - the data to writeoffset - the start offset in the datalength - the number of bytes to writejava.io.IOExceptionpublic void add(byte[] buffer,
int offset,
int length)
throws java.io.IOException
MessageBufferOutputadd in interface MessageBufferOutputbuffer - the data to addoffset - the start offset in the datalength - the number of bytes to addjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushablejava.io.IOException