public class MessageReader extends Reader implements MessageAppender
Due to the spec, this reader is forced to use the UTF8 charset.
Constructor and Description |
---|
MessageReader(AnnotatedEventDriver driver) |
Modifier and Type | Method and Description |
---|---|
void |
appendMessage(ByteBuffer payload)
Append the payload to the message.
|
void |
close() |
void |
messageComplete()
Notification that message is to be considered complete.
|
int |
read(char[] cbuf,
int off,
int len) |
public MessageReader(AnnotatedEventDriver driver)
public void appendMessage(ByteBuffer payload) throws IOException
MessageAppender
appendMessage
in interface MessageAppender
payload
- the payload to append.IOException
- if unable to append the payloadpublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class Reader
IOException
public void messageComplete()
MessageAppender
messageComplete
in interface MessageAppender
public int read(char[] cbuf, int off, int len) throws IOException
read
in class Reader
IOException
Copyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.