dk.vajhoej.record
Enum FieldType

java.lang.Object
  extended by java.lang.Enum<FieldType>
      extended by dk.vajhoej.record.FieldType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<FieldType>

public enum FieldType
extends java.lang.Enum<FieldType>

Enum FieldType specifies native struct types.
Semantics:

enum value description attributes native implementation Java implementation
INT1 8 bit signed integer byte
INT2 16 bit signed integer short
INT4 32 bit signed integer int
INT8 64 bit signed integer long
UINT1 8 bit unsigned integer short
UINT2 16 bit unsigned integer int
UINT4 32 bit unsigned integer long
FP4 32 bit IEEE floating point float
FP8 64 bit IEEE floating point double
FIXSTR Fixed length string length=<length of string>
encoding=<encoding used>
(default encoding is ISO-8859-1)
sequence of bytes String
FIXSTRNULTERM Fixed length string nul terminated length=<length of string>
encoding=<encoding used>
(default encoding is ISO-8859-1)
sequence of bytes with nul bytes added for write and stripped for read String
VARSTR Variable length string with 2 byte length prefix encoding=<encoding used>
(default encoding is ISO-8859-1, max. length is 32767)
2 byte length + sequence of bytes String
VARFIXSTR Variable length string with 2 byte length prefix and padded to max length length=<length of string>
encoding=<encoding used>
(default encoding is ISO-8859-1, max. length is 32767)
2 byte length + sequence of bytes String
BOOLEAN Boolean (0=false, other=true) length=<bytes used> bytes boolean
BIT Bits length=<bits used> (max. bits is 32) bytes int
JAVATIME Binary time in Java format (milliseconds since 1-Jan-1970) 64 bit integer java.util.Date
UNIXTIME Binary time in Unix format (seconds since 1-Jan-1970) 32 bit integer java.util.Date
VMSTIME Binary time in VMS format (100 nanoseconds since 17-Nov-1858) 64 bit integer java.util.Date
PACKEDBCD Packed BCD (1 byte = 2 decimal digit nibbles) length=<bytes used>
decimals=<number of implied decimals>
(default decimals is 0)
sequence of bytes java.math.BigDecimal
ZONEDBCD Zoned BCD (1 byte = 1 zone nibble + 1 decimal digit nibble) length=<bytes used>
decimals=<number of implied decimals>
zone=<zone value>
(default decimals i s0, default zone is EBCDIC)
sequence of bytes java.math.BigDecimal
VAXFP4 VAX F floating point 32 bit VAX floating point float
VAXFP8 VAX G floating point 64 bit VAX floating point double
STRUCT Sub struct


Enum Constant Summary
BIT
          Bits.
BOOLEAN
          Boolean.
FIXSTR
          Fixed length string.
FIXSTRNULTERM
          Fixed length string nul terminated.
FP4
          32 bit IEEE floating point.
FP8
          64 bit IEEE floating point.
INT1
          8 bit signed integer.
INT2
          16 bit signed integer.
INT4
          32 bit signed integer.
INT8
          64 bit signed integer.
JAVATIME
          Binary time in Java format.
PACKEDBCD
          Packed BCD.
STRUCT
          Sub struct.
UINT1
          8 bit unsigned integer.
UINT2
          16 bit unsigned integer.
UINT4
          32 bit unsigned integer.
UNIXTIME
          Binary time in Unix format.
VARFIXSTR
          Variable length string with 2 byte length prefix and padded to max length.
VARSTR
          Variable length string with 2 byte length prefix.
VAXFP4
          VAX F floating point.
VAXFP8
          VAX G floating point.
VMSTIME
          Binary time in VMS format.
ZONEDBCD
          Zoned BCD.
 
Method Summary
static FieldType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static FieldType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

INT1

public static final FieldType INT1
8 bit signed integer.


INT2

public static final FieldType INT2
16 bit signed integer.


INT4

public static final FieldType INT4
32 bit signed integer.


INT8

public static final FieldType INT8
64 bit signed integer.


UINT1

public static final FieldType UINT1
8 bit unsigned integer.


UINT2

public static final FieldType UINT2
16 bit unsigned integer.


UINT4

public static final FieldType UINT4
32 bit unsigned integer.


FP4

public static final FieldType FP4
32 bit IEEE floating point.


FP8

public static final FieldType FP8
64 bit IEEE floating point.


FIXSTR

public static final FieldType FIXSTR
Fixed length string.


FIXSTRNULTERM

public static final FieldType FIXSTRNULTERM
Fixed length string nul terminated.


VARSTR

public static final FieldType VARSTR
Variable length string with 2 byte length prefix.


VARFIXSTR

public static final FieldType VARFIXSTR
Variable length string with 2 byte length prefix and padded to max length.


BOOLEAN

public static final FieldType BOOLEAN
Boolean.


BIT

public static final FieldType BIT
Bits.


JAVATIME

public static final FieldType JAVATIME
Binary time in Java format.


UNIXTIME

public static final FieldType UNIXTIME
Binary time in Unix format.


VMSTIME

public static final FieldType VMSTIME
Binary time in VMS format.


PACKEDBCD

public static final FieldType PACKEDBCD
Packed BCD.


ZONEDBCD

public static final FieldType ZONEDBCD
Zoned BCD.


VAXFP4

public static final FieldType VAXFP4
VAX F floating point.


VAXFP8

public static final FieldType VAXFP8
VAX G floating point.


STRUCT

public static final FieldType STRUCT
Sub struct.

Method Detail

values

public static FieldType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (FieldType c : FieldType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static FieldType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null