public enum FieldType extends java.lang.Enum<FieldType>
OBJECT
.
Some field types are always serialized with a certain number of bytes; these are called
"fixed-width". Others are serialized with a variable number of bytes; these are called
"variable-width".Enum Constant and Description |
---|
ARRAY_OF_BYTE_ARRAYS |
BOOLEAN |
BOOLEAN_ARRAY |
BYTE |
BYTE_ARRAY |
CHAR |
CHAR_ARRAY |
DATE |
DOUBLE |
DOUBLE_ARRAY |
FLOAT |
FLOAT_ARRAY |
INT |
INT_ARRAY |
LONG |
LONG_ARRAY |
OBJECT |
OBJECT_ARRAY |
SHORT |
SHORT_ARRAY |
STRING |
STRING_ARRAY |
Modifier and Type | Method and Description |
---|---|
static FieldType |
get(java.lang.Class<?> c)
Given a Class return the corresponding FieldType.
|
java.nio.ByteBuffer |
getDefaultBytes()
Returns a ByteBuffer that contains the serialized encoding of this type's default value.
|
java.lang.Object |
getDefaultValue() |
int |
getWidth()
Returns the number of bytes used to serialize fixed-width fields; -1 is returned for
variable-width fields.
|
boolean |
isFixedWidth()
Returns true if the type is "fixed-width"; false if it is "variable-width".
|
java.lang.String |
toString() |
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.
|
public static final FieldType BOOLEAN
public static final FieldType BYTE
public static final FieldType CHAR
public static final FieldType SHORT
public static final FieldType INT
public static final FieldType LONG
public static final FieldType FLOAT
public static final FieldType DOUBLE
public static final FieldType DATE
public static final FieldType STRING
public static final FieldType OBJECT
public static final FieldType BOOLEAN_ARRAY
public static final FieldType CHAR_ARRAY
public static final FieldType BYTE_ARRAY
public static final FieldType SHORT_ARRAY
public static final FieldType INT_ARRAY
public static final FieldType LONG_ARRAY
public static final FieldType FLOAT_ARRAY
public static final FieldType DOUBLE_ARRAY
public static final FieldType STRING_ARRAY
public static final FieldType OBJECT_ARRAY
public static final FieldType ARRAY_OF_BYTE_ARRAYS
public static FieldType[] values()
for (FieldType c : FieldType.values()) System.out.println(c);
public static FieldType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic boolean isFixedWidth()
public int getWidth()
public java.lang.String toString()
toString
in class java.lang.Enum<FieldType>
public java.nio.ByteBuffer getDefaultBytes()
public static FieldType get(java.lang.Class<?> c)
public java.lang.Object getDefaultValue()