org.geotools.data.vpf.util
Class DataUtils

java.lang.Object
  extended byorg.geotools.data.vpf.util.DataUtils
All Implemented Interfaces:
DataTypesDefinition

public class DataUtils
extends java.lang.Object
implements DataTypesDefinition

Class DataUtils.java is responsible for a bunch of miscellaneous operations for reading and converting data

Created: Wed Jan 29 10:06:37 2003

Version:
$Id: DataUtils.java 17700 2006-01-22 23:30:39Z desruisseaux $
Author:
Artur Hefczyc

Field Summary
 
Fields inherited from interface org.geotools.data.vpf.ifc.DataTypesDefinition
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 Summary
DataUtils()
           
 
Method Summary
static void copyArrays(byte[] dest, byte[] source, int fromIdx)
          Describe copyArrays method here.
static java.lang.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 byte[] toBigEndian(byte[] source)
          Describe toBigEndian method here.
static int unsigByteToInt(byte b)
          Describe unsigByteToInt method here.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataUtils

public DataUtils()
Method Detail

toBigEndian

public static byte[] toBigEndian(byte[] source)
Describe toBigEndian method here.

Parameters:
source - a byte[] value
Returns:
a byte[] value

decodeData

public static java.lang.Object decodeData(byte[] bytes,
                                          char type)
Describe decodeData method here.

Parameters:
bytes - a byte[] value
type - a char value
Returns:
an Object value

copyArrays

public static void copyArrays(byte[] dest,
                              byte[] source,
                              int fromIdx)
Describe copyArrays method here.

Parameters:
dest - a byte[] value
source - a byte[] value
fromIdx - an int value

decodeShort

public static short decodeShort(byte[] bytes)
Describe decodeShort method here.

Parameters:
bytes - a byte[] value
Returns:
a short value

decodeInt

public static int decodeInt(byte[] bytes)
Describe decodeInt method here.

Parameters:
bytes - a byte[] value
Returns:
an int value

decodeFloat

public static float decodeFloat(byte[] bytes)
Describe decodeFloat method here.

Parameters:
bytes - a byte[] value
Returns:
a float value

decodeDouble

public static double decodeDouble(byte[] bytes)
Describe decodeDouble method here.

Parameters:
bytes - a byte[] value
Returns:
a double value

unsigByteToInt

public static int unsigByteToInt(byte b)
Describe unsigByteToInt method here.

Parameters:
b - a byte value
Returns:
an int value

getDataTypeSize

public static int getDataTypeSize(char type)
Describe getDataTypeSize method here.

Parameters:
type - a char value
Returns:
an int value

isNumeric

public static boolean isNumeric(char type)
Describe isNumeric method here.

Parameters:
type - a char value
Returns:
a boolean value


Copyright © GeoTools. All Rights Reserved.