public class Constant extends Object
Modifier and Type | Field and Description |
---|---|
static int |
CDF_BYTE
1-byte signed integer.
|
static int |
CDF_CHAR
1-byte, signed character (ASCII).
|
static int |
CDF_DOUBLE
8-byte floating point (double)
|
static int |
CDF_EPOCH
8-byte, double-precision floating-point.
|
static int |
CDF_EPOCH16
2 8-byte, double-precision floating-point.
|
static int |
CDF_FLOAT
4-byte floating point (float)
|
static int |
CDF_INT1
1-byte signed integer.
|
static int |
CDF_INT2
2-byte signed integer (short).
|
static int |
CDF_INT4
4-byte signed integer (int).
|
static int |
CDF_INT8
8-byte signed integer (long).
|
static int |
CDF_REAL4
4-byte floating point (float)
|
static int |
CDF_REAL8
8-byte floating point (double)
|
static int |
CDF_TIME_TT2000
8-byte, signed integer.
|
static int |
CDF_UINT1
1-byte unsigned integer.
|
static int |
CDF_UINT2
4-byte unsigned integer (short).
|
static int |
CDF_UINT4
8-byte unsigned integer (int).
|
static int |
CompressionOff
Compression off value.
|
static int |
CompressionOn
Compression on value.
|
static int |
ENCODING_ALPHAOSF1
DEC Alpha/OSF1 representation
|
static int |
ENCODING_DECSTATION
DECstation representation
|
static int |
ENCODING_HP
HP 9000 series representation
|
static int |
ENCODING_IBMPC
Intel Windows, Mac OS Intel and Solaris Intel representation
|
static int |
ENCODING_IBMRS
IBM RS-6000 representation
|
static int |
ENCODING_MAC
Macintosh representation
|
static int |
ENCODING_NETWORK
eXternal Data Representation
|
static int |
ENCODING_NeXT
NeXT representation
|
static int |
ENCODING_SGi
SGi representation
|
static int |
ENCODING_SUN
Sun representation
|
static int |
ENCODING_VAX
VAX representation
|
static int |
FLAG_COMPRESSION
Data compression in affect.
|
static int |
FLAG_PAD
Existence of pad values.
|
static int |
FLAG_VARIANCE
Dimension variance.
|
static int |
RECORD_ADR
Attribute Descriptor Record (ADR).
|
static int |
RECORD_AGREDR
Attribute g/rEntry Descriptor Record (AGREDR).
|
static int |
RECORD_AZEDR
Attribute zEntry Descriptor Record (AZEDR).
|
static int |
RECORD_CCR
Compressed CDF Record (CCR).
|
static int |
RECORD_CDR
CDF Descriptor Record (CDR).
|
static int |
RECORD_CPR
Compression Parameters Record (CPR).
|
static int |
RECORD_CVVR
Compressed Variable Values Record (CVVR).
|
static int |
RECORD_GDR
Global Descriptor Record (GDR).
|
static int |
RECORD_RVDR
rVariable Descriptor Record (RVDR).
|
static int |
RECORD_SPR
Sparseness Parameters Record (SPR).
|
static int |
RECORD_UIR
Unused Internal Record (UIR).
|
static int |
RECORD_VVR
Variable Values Record (VVR).
|
static int |
RECORD_VXR
Variable Index Record (VXR).
|
static int |
RECORD_ZVDR
zVariable Descriptor Record (ZVDR).
|
static int |
SCOPE_GLOBAL
Attribute scope is global.
|
static int |
SCOPE_GLOBAL_ASSUME
Attribute scope is global.
|
static int |
SCOPE_VARIABLE
Attribute scope is variable.
|
static int |
SCOPE_VARIABLE_ASSUME
Attribute scope is variable.
|
Constructor and Description |
---|
Constant() |
Modifier and Type | Method and Description |
---|---|
static String |
getByteOrder(int encoding)
Translate an encoding value into a byte order string.
|
static String |
getDataTypeName(int dataType)
Translate a data type token into a name.
|
static String |
getDataTypePDS(int dataType,
int encoding)
Translate a data type token into a name.
|
static int |
getDataTypeSize(int dataType)
Retrieve the size in bytes of a data type.
|
static String |
getEncodingName(int encoding)
Translate an encoding value into a string.
|
static String |
getRecTypeName(int recType)
Translate a record type token into a name.
|
static String |
getScopeName(int scope)
Translate a scope token into a name.
|
static boolean |
isCompressed(int compression)
Determines if compression is on.
|
static boolean |
isValidVersion(int version)
Determine if the version if a valid CDF version.
|
static String |
toHexString(int val)
Generate a string which represents a value in hex notation.
|
static String |
toHexString(long val)
Generate a string which represents a value in hex notation.
|
static ArrayList<String> |
valueToArrayList(byte[] buffer,
int dataType,
int numElems)
Transform a set of values into a string representation.
|
static String |
valueToString(byte[] buffer,
int dataType)
Transform a value into a string representation.
|
static String |
valueToString(byte[] buffer,
int dataType,
int elem)
Transform a value into a string representation.
|
static String |
valueToStringList(byte[] buffer,
int dataType,
int numElems)
Transform all values into a space separated string representation.
|
public static final int FLAG_VARIANCE
public static final int FLAG_PAD
public static final int FLAG_COMPRESSION
public static final int SCOPE_GLOBAL
public static final int SCOPE_VARIABLE
public static final int SCOPE_GLOBAL_ASSUME
public static final int SCOPE_VARIABLE_ASSUME
public static final int CDF_INT1
public static final int CDF_INT2
public static final int CDF_INT4
public static final int CDF_INT8
public static final int CDF_UINT1
public static final int CDF_UINT2
public static final int CDF_UINT4
public static final int CDF_BYTE
public static final int CDF_REAL4
public static final int CDF_REAL8
public static final int CDF_FLOAT
public static final int CDF_DOUBLE
public static final int CDF_EPOCH
public static final int CDF_EPOCH16
public static final int CDF_TIME_TT2000
public static final int CDF_CHAR
public static final int RECORD_UIR
public static final int RECORD_CDR
public static final int RECORD_GDR
public static final int RECORD_RVDR
public static final int RECORD_ADR
public static final int RECORD_AGREDR
public static final int RECORD_VXR
public static final int RECORD_VVR
public static final int RECORD_ZVDR
public static final int RECORD_AZEDR
public static final int RECORD_CCR
public static final int RECORD_CPR
public static final int RECORD_SPR
public static final int RECORD_CVVR
public static final int CompressionOn
public static final int CompressionOff
public static final int ENCODING_NETWORK
public static final int ENCODING_SUN
public static final int ENCODING_VAX
public static final int ENCODING_DECSTATION
public static final int ENCODING_SGi
public static final int ENCODING_IBMPC
public static final int ENCODING_IBMRS
public static final int ENCODING_MAC
public static final int ENCODING_HP
public static final int ENCODING_NeXT
public static final int ENCODING_ALPHAOSF1
public static String getEncodingName(int encoding)
encoding
- the CDF encoding value.public static String getByteOrder(int encoding)
encoding
- the CDF encoding value.public static boolean isValidVersion(int version)
version
- the version value.public static boolean isCompressed(int compression)
compression
- the compression "magic" value.public static String getRecTypeName(int recType)
recType
- the record type token.public static String getDataTypeName(int dataType)
dataType
- the data type token.public static String getDataTypePDS(int dataType, int encoding)
dataType
- the data type token.public static int getDataTypeSize(int dataType)
dataType
- the data type token.public static String getScopeName(int scope)
scope
- the scope token.public static String toHexString(int val)
val
- the value to represent.public static String toHexString(long val)
val
- the value to represent.public static String valueToString(byte[] buffer, int dataType)
buffer
- the bytes containing the value.dataType
- the data type of the value.public static String valueToStringList(byte[] buffer, int dataType, int numElems)
buffer
- the bytes containing the value.dataType
- the data type of the value.public static String valueToString(byte[] buffer, int dataType, int elem)
buffer
- the bytes containing the value.dataType
- the data type of the value.elem
- the index of the element to transform.public static ArrayList<String> valueToArrayList(byte[] buffer, int dataType, int numElems)
buffer
- the bytes containing the value.dataType
- the data type of the value.numElems
- the number of elements to transform.Copyright © 2014-2015 Regents University of California. All Rights Reserved.