|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amx.duet.tools.lang.ObjectRef
com.amx.duet.tools.io.Marshall
Includes handling for NetLinx binary marshalling.
Field Summary |
Constructor Summary | |
Marshall(boolean b)
Creates an object representation of the boolean argument. |
|
Marshall(byte b)
Creates an object representation of the byte argument. |
|
Marshall(char c)
Creates an object representation of the char argument. |
|
Marshall(double d)
Creates an object representation of the double argument. |
|
Marshall(float f)
Creates an object representation of the float argument. |
|
Marshall(int i)
Creates an object representation of the int argument. |
|
Marshall(long l)
Creates an object representation of the long argument. |
|
Marshall(java.lang.Object o)
Stores a copy of the Object argument. |
|
Marshall(java.lang.Object o,
ObjectType refType)
Stores a copy of the Object argument as the ObjectType
passed in. |
|
Marshall(short s)
Creates an object representation of the short argument. |
|
Marshall(java.lang.String str)
Creates an object representation of the String argument. |
Method Summary | |
int |
binaryDecode(ObjectRef buffer,
boolean skipHeader)
|
int |
binaryDecode(ObjectRef buffer,
ObjectRef rPos)
This function should decode a string buffer |
int |
binaryDecodeString(ObjectRef buffer)
|
int |
binaryEncode(ObjectRef buffer,
boolean skipHeader)
|
int |
binaryEncode(ObjectRef buffer,
ObjectRef rPos)
This function should encode a string buffer. |
int |
binaryEncodeString(ObjectRef buffer,
boolean wideChar)
|
static boolean |
skipBinaryHeader(byte type)
This method will check the marshall type passed to see if the instrinsic value's header byte should be skipped. |
Methods inherited from class com.amx.duet.tools.lang.ObjectRef |
booleanValue, byteValue, charValue, doubleValue, equals, floatValue, getType, getValue, intValue, longValue, shortValue, stringValue, toBoolean, toByte, toChar, toDouble, toFloat, toInt, toLong, toShort, toString, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Marshall(boolean b)
boolean
argument.
b
- a boolean
.public Marshall(byte b)
byte
argument.
b
- a byte
.public Marshall(char c)
char
argument.
c
- a char
.public Marshall(short s)
short
argument.
s
- a short
.public Marshall(int i)
int
argument.
i
- a int
.public Marshall(long l)
long
argument.
l
- a long
.public Marshall(float f)
float
argument.
f
- a float
.public Marshall(double d)
double
argument.
d
- a double
.public Marshall(java.lang.String str)
String
argument.
str
- a String
.public Marshall(java.lang.Object o)
Object
argument.
o
- an Object
.public Marshall(java.lang.Object o, ObjectType refType)
Object
argument as the ObjectType
passed in.
o
- an Object
.refType
- the ObjectType
that the object is assigned as.Method Detail |
public static final boolean skipBinaryHeader(byte type)
type
-
public int binaryEncode(ObjectRef buffer, ObjectRef rPos)
NOTE: to encode an array create an ObjectRef array, and then do the binaryEncode method on the individual elements
binaryEncode
in interface IBinaryMarshall
rPos
- Must be of type long. This is where the first byte of the encoding
is placed. It is also modified to point to the next location after the last encoded byte.
That means that successive calls to this function can be made without modifying position.
Position should be set to 0 on the first call.
Create rPos with a valueOf(long) Example:
ObjectRef rPos = new ObjectRef((long)0) or rPos.valueOf((long)0)
public int binaryEncode(ObjectRef buffer, boolean skipHeader)
buffer
- skipHeader
-
public int binaryDecode(ObjectRef buffer, ObjectRef rPos)
binaryDecode
in interface IBinaryMarshall
rPos
- Must be of type long. This is where the first byte of the decode
data. Is it also modified to point to the next location after the last decoded byte. That means
that successive calls to this function can be made without modifying position. Position should
be set to 0 on the first call.
Create rPos with a valueOf(long) Example:
ObjectRef rPos = new ObjectRef((long)0) or rPos.valueOf((long)0)
public int binaryDecode(ObjectRef buffer, boolean skipHeader)
buffer
- skipHeader
-
public int binaryEncodeString(ObjectRef buffer, boolean wideChar)
buffer
- wideChar
-
public int binaryDecodeString(ObjectRef buffer)
buffer
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |