|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectglobal.Convert
public class Convert
Provides conversion routines for getting and setting data in byte arrays.
Constructor Summary | |
---|---|
Convert()
|
Method Summary | |
---|---|
static char |
getCharValue(int pos,
byte[] data)
Reads from the given byte array at the specified position, and converts it into a unicode character. |
static float |
getFloatValue(int pos,
byte[] data)
Reads from the given byte array at the specified position, and converts it to a float. |
static int |
getIntValue(int pos,
byte[] data)
Reads from the given byte array at the specified position, and converts it into an integer. |
static short |
getShortValue(int pos,
byte[] data)
Reads from the given byte array at the specified position, and converts it into a short. |
static java.lang.String |
getStringValue(int pos,
byte[] data,
int length)
Reads from the given byte array at the specified position, and converts it to a string of given length. |
static void |
setCharValue(char value,
int pos,
byte[] data)
Writes a unicode character into the given byte array at the specified position. |
static void |
setFloatValue(float value,
int pos,
byte[] data)
Writes a float into the given byte array at the specified position. |
static void |
setIntValue(int value,
int pos,
byte[] data)
Writes an integer into the given byte array at the specified position. |
static void |
setShortValue(short value,
int pos,
byte[] data)
Writes a short into the given byte array at the specified position. |
static void |
setStringValue(java.lang.String value,
int pos,
byte[] data)
Writes a string into 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 char getCharValue(int pos, byte[] data)
public static void setCharValue(char value, int pos, byte[] data)
public static short getShortValue(int pos, byte[] data) throws java.io.IOException
java.io.IOException
public static void setShortValue(short value, int pos, byte[] data) throws java.io.IOException
java.io.IOException
public static int getIntValue(int pos, byte[] data) throws java.io.IOException
java.io.IOException
public static void setIntValue(int value, int pos, byte[] data) throws java.io.IOException
java.io.IOException
public static float getFloatValue(int pos, byte[] data) throws java.io.IOException
java.io.IOException
public static void setFloatValue(float value, int pos, byte[] data) throws java.io.IOException
java.io.IOException
public static java.lang.String getStringValue(int pos, byte[] data, int length)
public static void setStringValue(java.lang.String value, int pos, byte[] data)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |