Package org.geotools.data.vpf.util
Class DataUtils
- Object
- 
- DataUtils
 
- 
- All Implemented Interfaces:
- DataTypesDefinition
 
 public class DataUtils extends Object implements DataTypesDefinition Class DataUtils.java is responsible for a bunch of miscellaneous operations for reading and converting dataCreated: Wed Jan 29 10:06:37 2003 - Author:
- Artur Hefczyc
 
- 
- 
Field Summary- 
Fields inherited from interface DataTypesDefinitionBIG_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 SummaryConstructors Constructor Description DataUtils()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcopyArrays(byte[] dest, byte[] source, int fromIdx)DescribecopyArraysmethod here.static ObjectdecodeData(byte[] bytes, char type)DescribedecodeDatamethod here.static doubledecodeDouble(byte[] bytes)DescribedecodeDoublemethod here.static floatdecodeFloat(byte[] bytes)DescribedecodeFloatmethod here.static intdecodeInt(byte[] bytes)DescribedecodeIntmethod here.static shortdecodeShort(byte[] bytes)DescribedecodeShortmethod here.static intgetDataTypeSize(char type)DescribegetDataTypeSizemethod here.static booleanisNumeric(char type)DescribeisNumericmethod here.static intlittleEndianToInt(byte[] fourBytes)static byte[]toBigEndian(byte[] source)Converts the provided array to big endian.static intunsigByteToInt(byte b)DescribeunsigByteToIntmethod here.
 
- 
- 
- 
Method Detail- 
toBigEndianpublic static byte[] toBigEndian(byte[] source) Converts the provided array to big endian.As java is BigEndian the implementation just makes a copy. - Parameters:
- source- a- byte[]value
- Returns:
- a byte[]value
 
 - 
decodeDatapublic static Object decodeData(byte[] bytes, char type) DescribedecodeDatamethod here.- Parameters:
- bytes- a- byte[]value
- type- a- charvalue
- Returns:
- an Objectvalue
 
 - 
copyArrayspublic static void copyArrays(byte[] dest, byte[] source, int fromIdx)DescribecopyArraysmethod here.- Parameters:
- dest- a- byte[]value
- source- a- byte[]value
- fromIdx- an- intvalue
 
 - 
decodeShortpublic static short decodeShort(byte[] bytes) DescribedecodeShortmethod here.- Parameters:
- bytes- a- byte[]value
- Returns:
- a shortvalue
 
 - 
littleEndianToIntpublic static int littleEndianToInt(byte[] fourBytes) 
 - 
decodeIntpublic static int decodeInt(byte[] bytes) DescribedecodeIntmethod here.- Parameters:
- bytes- a- byte[]value
- Returns:
- an intvalue
 
 - 
decodeFloatpublic static float decodeFloat(byte[] bytes) DescribedecodeFloatmethod here.- Parameters:
- bytes- a- byte[]value
- Returns:
- a floatvalue
 
 - 
decodeDoublepublic static double decodeDouble(byte[] bytes) DescribedecodeDoublemethod here.- Parameters:
- bytes- a- byte[]value
- Returns:
- a doublevalue
 
 - 
unsigByteToIntpublic static int unsigByteToInt(byte b) DescribeunsigByteToIntmethod here.- Parameters:
- b- a- bytevalue
- Returns:
- an intvalue
 
 - 
getDataTypeSizepublic static int getDataTypeSize(char type) DescribegetDataTypeSizemethod here.- Parameters:
- type- a- charvalue
- Returns:
- an intvalue
 
 - 
isNumericpublic static boolean isNumeric(char type) DescribeisNumericmethod here.- Parameters:
- type- a- charvalue
- Returns:
- a booleanvalue
 
 
- 
 
-