public class MessageChannelReader extends Object implements MessageReader
| Constructor and Description |
|---|
MessageChannelReader(ReadChannel in)
Construct from an existing ReadChannel.
|
| Modifier and Type | Method and Description |
|---|---|
long |
bytesRead()
Get the number of bytes read from the ReadChannel.
|
void |
close()
Close the ReadChannel.
|
ArrowBuf |
readMessageBody(Message message,
BufferAllocator allocator)
Read a message body from the ReadChannel.
|
Message |
readNextMessage()
Read the next message from the ReadChannel.
|
public MessageChannelReader(ReadChannel in)
in - Channel to read messages frompublic Message readNextMessage() throws IOException
readNextMessage in interface MessageReaderIOExceptionpublic ArrowBuf readMessageBody(Message message, BufferAllocator allocator) throws IOException
readMessageBody in interface MessageReadermessage - Read message that is followed by a body of dataallocator - BufferAllocator to allocate memory for body dataIOExceptionpublic long bytesRead()
bytesRead in interface MessageReaderpublic void close()
throws IOException
close in interface MessageReaderIOExceptionCopyright © 2017 The Apache Software Foundation. All rights reserved.