|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.elkoserver.foundation.net.JSONByteIOFramer
public class JSONByteIOFramer
I/O framer implementation for JSON messages.
| Constructor Summary | |
|---|---|
JSONByteIOFramer(Trace msgTrace,
MessageReceiver receiver,
String label)
Constructor. |
|
JSONByteIOFramer(Trace msgTrace,
MessageReceiver receiver,
String label,
ChunkyByteArrayInputStream in)
Constructor with explicit input. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JSONByteIOFramer(Trace msgTrace,
MessageReceiver receiver,
String label)
public JSONByteIOFramer(Trace msgTrace,
MessageReceiver receiver,
String label,
ChunkyByteArrayInputStream in)
| Method Detail |
|---|
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.
IOException
public byte[] produceBytes(Object message)
throws IOException
produceBytes in interface ByteIOFramermessage - The message to be written. In this implementation,
the message must be a string.
IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||