public class JSONByteIOFramer extends Object implements ByteIOFramer
| Constructor and Description |
|---|
JSONByteIOFramer(Trace msgTrace,
MessageReceiver receiver,
String label)
Constructor.
|
JSONByteIOFramer(Trace msgTrace,
MessageReceiver receiver,
String label,
ChunkyByteArrayInputStream in)
Constructor with explicit input.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
produceBytes(Object message)
Generate the bytes for writing a message to a connection.
|
void |
receiveBytes(byte[] data,
int length)
Process bytes of data received.
|
public JSONByteIOFramer(Trace msgTrace, MessageReceiver receiver, String label)
public JSONByteIOFramer(Trace msgTrace, MessageReceiver receiver, String label, ChunkyByteArrayInputStream in)
public void receiveBytes(byte[] data,
int length)
throws IOException
receiveBytes in interface ByteIOFramerdata - The bytes received.length - Number of usable bytes in 'data'. End of input is
indicated by passing a 'length' value of 0.IOExceptionpublic byte[] produceBytes(Object message) throws IOException
produceBytes in interface ByteIOFramermessage - The message to be written. In this implementation,
the message must be a string.IOExceptionCopyright © 2017. All rights reserved.