|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmx.udlap.kjProtocol.packets.KInteger
4 bytes Integer container
| Field Summary | |
static int |
MAXVALUE
|
byte[] |
value
Value for this object |
| Constructor Summary | |
KInteger(byte[] value)
Constructor for the KInteger object that takes a byte array as initial value |
|
KInteger(byte msb,
byte third,
byte second,
byte lsb)
Constructor for the KInteger object that takes 4 bytes to form the initial value. |
|
KInteger(int value)
Constructor for the KInteger object that takes a int as initial value |
|
| Method Summary | |
byte[] |
getBytes()
Gets the bytes from the value. |
int |
getIntValue()
Gets the integer value of the KInteger object |
byte[] |
getValue()
Gets the value attribute of the KInteger object |
static void |
main(java.lang.String[] args)
Class testing |
void |
setValue(byte[] value)
Sets the value attribute of the KInteger object |
void |
setValue(byte msb,
byte third,
byte second,
byte lsb)
Sets the value attribute of the KInteger object |
void |
setValue(int value)
Sets the value attribute of the KInteger object it truncates the extra bytes |
java.lang.String |
toString()
Description of the Method |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int MAXVALUE
public byte[] value
| Constructor Detail |
public KInteger(int value)
value - Value of this Objectpublic KInteger(byte[] value)
value - Byte array to taken as Integer in this Object, MSB is index 3,
LSB is index 0.
public KInteger(byte msb,
byte third,
byte second,
byte lsb)
msb - Most significant bytethird - Third least significant bytesecond - Second least significant bytelsb - Least significant byte| Method Detail |
public void setValue(byte[] value)
value - The new value value
public void setValue(byte msb,
byte third,
byte second,
byte lsb)
msb - Most significant bytethird - Third least significant bytesecond - Second least significant bytelsb - Least significant bytepublic void setValue(int value)
value - The new value valuepublic byte[] getValue()
public int getIntValue()
public byte[] getBytes()
public java.lang.String toString()
public static void main(java.lang.String[] args)
args - Description of the Parameter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||