- java.lang.Object
-
- java.lang.Enum<DataType>
-
- de.haumacher.msgbuf.binary.DataType
-
- All Implemented Interfaces:
Serializable,Comparable<DataType>
public enum DataType extends Enum<DataType>
Declaration of the content-type of an array value.- See Also:
DataWriter.beginArray(DataType, int)
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BINARYBinary string values.DOUBLEdoublevalues.FINTFixed size 32 bitintvalues.FLOATfloatvalues.FLONGFixed size 64 bitlongvalues.INTUnsinedintvalues.LONGUnsinedlongvalues.OBJECTObject values.SINTsinedintvalues.SLONGSinedlongvalues.STRINGStringvalues.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DataTypevalueOf(String name)Returns the enum constant of this type with the specified name.static DataType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INT
public static final DataType INT
Unsinedintvalues.All array entries must be written using
DataWriter.value(int).
-
SINT
public static final DataType SINT
sinedintvalues.All array entries must be written using
DataWriter.valueSigned(int).
-
FINT
public static final DataType FINT
Fixed size 32 bitintvalues.All array entries must be written using
DataWriter.valueFixed(int).
-
FLOAT
public static final DataType FLOAT
floatvalues.All array entries must be written using
DataWriter.value(float).
-
LONG
public static final DataType LONG
Unsinedlongvalues.All array entries must be written using
DataWriter.value(long).
-
SLONG
public static final DataType SLONG
Sinedlongvalues.All array entries must be written using
DataWriter.valueSigned(long).
-
FLONG
public static final DataType FLONG
Fixed size 64 bitlongvalues.All array entries must be written using
DataWriter.valueFixed(long).
-
DOUBLE
public static final DataType DOUBLE
doublevalues.All array entries must be written using
DataWriter.value(double).
-
STRING
public static final DataType STRING
Stringvalues.All array entries must be written using
DataWriter.value(String).
-
BINARY
public static final DataType BINARY
Binary string values.All array entries must be written using
DataWriter.value(byte[]).
-
OBJECT
public static final DataType OBJECT
Object values.All array entries must be written with the
DataWriter.beginObject()/DataWriter.endObject()pair of methods.
-
-
Method Detail
-
values
public static DataType[] 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 (DataType c : DataType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DataType valueOf(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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
-