public enum FieldType extends 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(Class<?> c)
Given a Class return the corresponding FieldType.
|
ByteBuffer |
getDefaultBytes() |
Object |
getDefaultValue() |
int |
getWidth() |
boolean |
isFixedWidth() |
String |
toString() |
static FieldType |
valueOf(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(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean isFixedWidth()
public int getWidth()
public ByteBuffer getDefaultBytes()
public Object getDefaultValue()