public class DataUtils extends Object implements DataTypesDefinition
Created: Wed Jan 29 10:06:37 2003
BIG_ENDIAN_ORDER, CHAR_NULL_VALUE, DATA_2_COORD_F, DATA_2_COORD_F_LEN, DATA_2_COORD_R, DATA_2_COORD_R_LEN, DATA_3_COORD_F, DATA_3_COORD_F_LEN, DATA_3_COORD_R, DATA_3_COORD_R_LEN, DATA_DATE_TIME, DATA_DATE_TIME_LEN, DATA_LEVEL1_TEXT, DATA_LEVEL2_TEXT, DATA_LEVEL3_TEXT, DATA_LONG_FLOAT, DATA_LONG_FLOAT_LEN, DATA_LONG_INTEGER, DATA_LONG_INTEGER_LEN, DATA_NULL_FIELD, DATA_NULL_FIELD_LEN, DATA_SHORT_FLOAT, DATA_SHORT_FLOAT_LEN, DATA_SHORT_INTEGER, DATA_SHORT_INTEGER_LEN, DATA_TEXT, DATA_TRIPLET_ID, DATA_TRIPLET_ID_LEN, LEAST_SIGNIF_FIRST, LITTLE_ENDIAN_ORDER, MOST_SIGNIF_FIRST, STRING_NULL_VALUE, STRING_NULL_VALUES
Constructor and Description |
---|
DataUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
copyArrays(byte[] dest,
byte[] source,
int fromIdx)
Describe
copyArrays method here. |
static Object |
decodeData(byte[] bytes,
char type)
Describe
decodeData method here. |
static double |
decodeDouble(byte[] bytes)
Describe
decodeDouble method here. |
static float |
decodeFloat(byte[] bytes)
Describe
decodeFloat method here. |
static int |
decodeInt(byte[] bytes)
Describe
decodeInt method here. |
static short |
decodeShort(byte[] bytes)
Describe
decodeShort method here. |
static int |
getDataTypeSize(char type)
Describe
getDataTypeSize method here. |
static boolean |
isNumeric(char type)
Describe
isNumeric method here. |
static int |
littleEndianToInt(byte[] fourBytes) |
static byte[] |
toBigEndian(byte[] source)
Converts the provided array to big endian.
|
static int |
unsigByteToInt(byte b)
Describe
unsigByteToInt method here. |
public static byte[] toBigEndian(byte[] source)
As java is BigEndian the implementation just makes a copy.
source
- a byte[]
valuebyte[]
valuepublic static Object decodeData(byte[] bytes, char type)
decodeData
method here.bytes
- a byte[]
valuetype
- a char
valueObject
valuepublic static void copyArrays(byte[] dest, byte[] source, int fromIdx)
copyArrays
method here.dest
- a byte[]
valuesource
- a byte[]
valuefromIdx
- an int
valuepublic static short decodeShort(byte[] bytes)
decodeShort
method here.bytes
- a byte[]
valueshort
valuepublic static int littleEndianToInt(byte[] fourBytes)
public static int decodeInt(byte[] bytes)
decodeInt
method here.bytes
- a byte[]
valueint
valuepublic static float decodeFloat(byte[] bytes)
decodeFloat
method here.bytes
- a byte[]
valuefloat
valuepublic static double decodeDouble(byte[] bytes)
decodeDouble
method here.bytes
- a byte[]
valuedouble
valuepublic static int unsigByteToInt(byte b)
unsigByteToInt
method here.b
- a byte
valueint
valuepublic static int getDataTypeSize(char type)
getDataTypeSize
method here.type
- a char
valueint
valuepublic static boolean isNumeric(char type)
isNumeric
method here.type
- a char
valueboolean
valueCopyright © 1996–2023 Geotools. All rights reserved.