Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FILE_NAME
File name.
|
Modifier and Type | Method and Description |
---|---|
static void |
copyToBytes(byte[] data,
int dateType)
Converts the data type to bytes.
|
int |
getType()
Returns type of data.
|
static int |
toInt(byte[] header)
Converts the data type to int.
|
static DataType |
valueOf(byte[] type)
Create type use type bytes.
|
static DataType |
valueOf(int type)
Create type uses specific type.
|
static DataType |
valueOf(java.lang.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.
|
public static final DataType TEXT
public static final DataType FILE
public static final java.lang.String FILE_NAME
public static DataType[] values()
for (DataType c : DataType.values()) System.out.println(c);
public static DataType 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 int getType()
public static DataType valueOf(byte[] type)
type
- typeDataType
public static DataType valueOf(int type)
type
- typeDataType
public static int toInt(byte[] header)
header
- data type bytespublic static void copyToBytes(byte[] data, int dateType)
data
- the array to copy out ofdateType
- data type