public class BinaryStreamer extends VehicleMessageStreamer
| Constructor and Description |
|---|
BinaryStreamer() |
| Modifier and Type | Method and Description |
|---|---|
static void |
dumpToLog(byte[] bytes,
int length) |
java.lang.String |
getRawMessage() |
VehicleMessage |
parseMessage(java.lang.String line) |
VehicleMessage |
parseNextMessage()
Deserialize and return the next messages from the internally buffered
stream.
|
void |
receive(byte[] bytes,
int length)
Add additional bytes to the buffer from the data source.
|
byte[] |
serializeForStream(VehicleMessage message)
Serialize the message and insert any required delimiters for insertion
into a message stream.
|
public VehicleMessage parseNextMessage()
VehicleMessageStreamerparseNextMessage in class VehicleMessageStreamerpublic VehicleMessage parseMessage(java.lang.String line)
parseMessage in class VehicleMessageStreamerpublic java.lang.String getRawMessage()
getRawMessage in class VehicleMessageStreamerpublic byte[] serializeForStream(VehicleMessage message) throws SerializationException
VehicleMessageStreamerserializeForStream in class VehicleMessageStreamermessage - the message to serialize.SerializationException - if the message cannot be serialized.public static void dumpToLog(byte[] bytes,
int length)
public void receive(byte[] bytes,
int length)
VehicleMessageStreamerreceive in class VehicleMessageStreamerbytes - an array of bytes received from the interface.length - number of bytes received, and thus the amount that should
be read from the array.