public class JavaByteMessage
extends java.lang.Object
Constructor and Description |
---|
JavaByteMessage(byte[] incoming)
Initializes a
JavaCppMessage , based off of a
byte[] , used to reconstruct a message sent from a c++
program |
JavaByteMessage(int control)
Initializes a
JavaCppMessage , message type is set at
creation, and cannot be changed. |
Modifier and Type | Method and Description |
---|---|
int |
getCONTROL() |
java.lang.String |
getDescription() |
byte[] |
getInput() |
byte[] |
getOutput() |
java.lang.String |
getStreamIdentifier() |
boolean |
isFromJava() |
void |
setDescription(java.lang.String description) |
void |
setFromJava(boolean isFromJava) |
void |
setInput(byte[] input) |
void |
setOutput(byte[] output) |
void |
setStreamIdentifier(java.lang.String streamIdentifier) |
byte[] |
toByteArray()
Function to convert the JavaCppMessage to a
byte[] to be
sent to another program |
java.lang.String |
toString()
Helper to view the contents of a JavaCppMessage - useful for debugging
|
public JavaByteMessage(int control)
JavaCppMessage
, message type is set at
creation, and cannot be changed.control
- Type of message as specified in ControlMessage
public JavaByteMessage(byte[] incoming)
JavaCppMessage
, based off of a
byte[]
, used to reconstruct a message sent from a c++
programincoming
- The byte[]
recieved from an external programpublic int getCONTROL()
public void setInput(byte[] input)
public byte[] getInput()
public void setOutput(byte[] output)
public byte[] getOutput()
public void setStreamIdentifier(java.lang.String streamIdentifier)
public java.lang.String getStreamIdentifier()
public void setDescription(java.lang.String description)
public java.lang.String getDescription()
public void setFromJava(boolean isFromJava)
public boolean isFromJava()
public byte[] toByteArray()
byte[]
to be
sent to another programbyte[]
representation of this
JavaCppMessagepublic java.lang.String toString()
toString
in class java.lang.Object