|
jSyncManager | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jSyncManager.API.Protocol.Argument
org.jSyncManager.API.Protocol.ShortArgument
The short argument abstract class. This argument type is used as a parent to all "short" arguments. Short arguments all contain an argument ID, and can have multiple representations.
| Field Summary | |
(package private) byte |
argumentID
A field to hold this arguments ID number. |
(package private) byte[] |
data
The data contained by this argument. |
static byte |
FIRST_ARG_ID
The ID number for the first argument in any packet containing arguments. |
| Constructor Summary | |
(package private) |
ShortArgument()
Create a new short argument. |
(package private) |
ShortArgument(byte[] inData)
Constructs a new argument from the specified data. |
| Method Summary | |
(package private) abstract byte[] |
arg2Bytes()
Converts this argument into an array of bytes. |
static Argument |
createArgument(byte[] data,
int i)
Creates an argument from a byte array. |
(package private) abstract byte[] |
getArgument()
Gets this arguments data as an array of bytes. |
(package private) abstract int |
getSize()
Retreives the size of this argument. |
static Argument |
parseArgument(byte[] inData)
Parses a byte array representing an argument into its corresponding Argument object. |
static Argument[] |
parseArguments(int i,
byte[] data)
Parses a series of arguments into an array of argument objects. |
java.lang.String |
toString()
Convert this object to a human-readable String. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
byte argumentID
byte[] data
public static final byte FIRST_ARG_ID
| Constructor Detail |
ShortArgument()
ShortArgument(byte[] inData)
| Method Detail |
public java.lang.String toString()
abstract byte[] arg2Bytes()
abstract int getSize()
abstract byte[] getArgument()
public static Argument createArgument(byte[] data,
int i)
data - the data to be included in the argument.i - the ID of the first argument in this packet.
public static Argument parseArgument(byte[] inData)
inData - the input byte array to be parsed.
public static Argument[] parseArguments(int i,
byte[] data)
i - the number of arguments to parse.data - the input data array.
|
jSyncManager | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||