|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectglobal.Convert
Constructor Summary | |
Convert()
|
Method Summary | |
static char |
getCharValue(int position,
byte[] data)
reads 2 bytes from the given byte array at the specified position convert it to a character |
static float |
getFloValue(int position,
byte[] data)
read 4 bytes from given byte array at the specified position convert it to a float value |
static int |
getIntValue(int position,
byte[] data)
read 4 bytes from given byte array at the specified position convert it to an integer |
static short |
getShortValue(int position,
byte[] data)
read 2 bytes from given byte array at the specified position convert it to a short integer |
static java.lang.String |
getStrValue(int position,
byte[] data,
int length)
reads a string that has been encoded using a modified UTF-8 format from the given byte array at the specified position |
static void |
setCharValue(char value,
int position,
byte[] data)
Update a character in the given byte array at the specified position. |
static void |
setFloValue(float value,
int position,
byte[] data)
update a float value in the given byte array at the specified position |
static void |
setIntValue(int value,
int position,
byte[] data)
update an integer value in the given byte array at the specified position |
static void |
setShortValue(short value,
int position,
byte[] data)
update a short integer in the given byte array at the specified position |
static void |
setStrValue(java.lang.String value,
int position,
byte[] data)
Insert or update a string in the given byte array at the specified position. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Convert()
Method Detail |
public static int getIntValue(int position, byte[] data) throws java.io.IOException
data
- a byte arrayposition
- in data[]
java.io.IOException
- I/O errorspublic static float getFloValue(int position, byte[] data) throws java.io.IOException
data
- a byte arrayposition
- in data[]
java.io.IOException
- I/O errorspublic static short getShortValue(int position, byte[] data) throws java.io.IOException
data
- a byte arrayposition
- the position in data[]
java.io.IOException
- I/O errorspublic static java.lang.String getStrValue(int position, byte[] data, int length) throws java.io.IOException
data
- a byte arrayposition
- the position in data[]length
- the length of the string in bytes
(=strlength +2)
java.io.IOException
- I/O errorspublic static char getCharValue(int position, byte[] data) throws java.io.IOException
data
- a byte arrayposition
- the position in data[]
java.io.IOException
- I/O errorspublic static void setIntValue(int value, int position, byte[] data) throws java.io.IOException
data
- a byte arrayvalue
- the value to be copied into the data[]position
- the position of tht value in data[]
java.io.IOException
- I/O errorspublic static void setFloValue(float value, int position, byte[] data) throws java.io.IOException
data
- a byte arrayvalue
- the value to be copied into the data[]position
- the position of tht value in data[]
java.io.IOException
- I/O errorspublic static void setShortValue(short value, int position, byte[] data) throws java.io.IOException
data
- a byte arrayvalue
- the value to be copied into data[]position
- the position of tht value in data[]
java.io.IOException
- I/O errorspublic static void setStrValue(java.lang.String value, int position, byte[] data) throws java.io.IOException
data
- a byte arrayvalue
- the value to be copied into data[]position
- the position of tht value in data[]
java.io.IOException
- I/O errorspublic static void setCharValue(char value, int position, byte[] data) throws java.io.IOException
data
- a byte arrayvalue
- the value to be copied into data[]position
- the position of tht value in data[]
java.io.IOException
- I/O errors
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |