public class MessageStreamImpl extends StreamImpl
_nullPath, _path| Constructor and Description |
|---|
MessageStreamImpl(MessageQueueSubscription sub) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRead()
Returns true if this is a read stream.
|
void |
closeWrite()
Closes the write half of the stream.
|
int |
read(byte[] buffer,
int offset,
int length)
Reads the next chunk from the stream.
|
void |
write(byte[] buffer,
int offset,
int length,
boolean isEnd)
Writes a buffer to the underlying stream.
|
canWrite, clearWrite, close, flush, flushBuffer, flushToDisk, getAttribute, getAttributeNames, getAvailable, getFlushOnNewline, getNewline, getPath, getReadBuffer, getReadPosition, hasSkip, isClosed, isEof, isMmapEnabled, isSendfileEnabled, readNonBlock, readTimeout, removeAttribute, seekEnd, seekStart, setAttribute, setPath, setWriteEncoding, skip, write, writeMmap, writeSendfilepublic MessageStreamImpl(MessageQueueSubscription sub)
public void write(byte[] buffer,
int offset,
int length,
boolean isEnd)
throws java.io.IOException
StreamImplwrite in class StreamImplbuffer - the byte array to write.offset - the offset into the byte array.length - the number of bytes to write.isEnd - true when the write is flushing a close.java.io.IOExceptionpublic void closeWrite()
throws java.io.IOException
StreamImplcloseWrite in class StreamImpljava.io.IOExceptionpublic boolean canRead()
StreamImplcanRead in class StreamImplpublic int read(byte[] buffer,
int offset,
int length)
throws java.io.IOException
StreamImplread in class StreamImplbuffer - byte array receiving the data.offset - starting offset into the array.length - number of bytes to read.java.io.IOException