Enum TSDataType
- java.lang.Object
-
- java.lang.Enum<TSDataType>
-
- org.apache.iotdb.tsfile.file.metadata.enums.TSDataType
-
- All Implemented Interfaces:
Serializable,Comparable<TSDataType>
public enum TSDataType extends Enum<TSDataType>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TSDataTypedeserialize(byte type)give an integer to return a data type.static TSDataTypedeserializeFrom(InputStream stream)static TSDataTypedeserializeFrom(ByteBuffer buffer)intgetDataTypeSize()static intgetSerializedSize()static TSDataTypegetTsDataType(byte type)bytegetType()booleanisComparable()comparable datatype judgement.booleanisNumeric()numeric datatype judgement.byteserialize()get type byte.voidserializeTo(DataOutputStream outputStream)voidserializeTo(FileOutputStream outputStream)voidserializeTo(ByteBuffer byteBuffer)static TSDataTypevalueOf(String name)Returns the enum constant of this type with the specified name.static TSDataType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BOOLEAN
public static final TSDataType BOOLEAN
BOOLEAN.
-
INT32
public static final TSDataType INT32
INT32.
-
INT64
public static final TSDataType INT64
INT64.
-
FLOAT
public static final TSDataType FLOAT
FLOAT.
-
DOUBLE
public static final TSDataType DOUBLE
DOUBLE.
-
TEXT
public static final TSDataType TEXT
TEXT.
-
VECTOR
public static final TSDataType VECTOR
VECTOR.
-
UNKNOWN
public static final TSDataType UNKNOWN
UNKNOWN.
-
-
Method Detail
-
values
public static TSDataType[] 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 (TSDataType c : TSDataType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TSDataType 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
-
deserialize
public static TSDataType deserialize(byte type)
give an integer to return a data type.- Parameters:
type- -param to judge enum type- Returns:
- -enum type
-
getType
public byte getType()
-
getTsDataType
public static TSDataType getTsDataType(byte type)
-
deserializeFrom
public static TSDataType deserializeFrom(ByteBuffer buffer)
-
deserializeFrom
public static TSDataType deserializeFrom(InputStream stream) throws IOException
- Throws:
IOException
-
getSerializedSize
public static int getSerializedSize()
-
serializeTo
public void serializeTo(ByteBuffer byteBuffer)
-
serializeTo
public void serializeTo(DataOutputStream outputStream) throws IOException
- Throws:
IOException
-
serializeTo
public void serializeTo(FileOutputStream outputStream) throws IOException
- Throws:
IOException
-
getDataTypeSize
public int getDataTypeSize()
-
serialize
public byte serialize()
get type byte.- Returns:
- byte number
-
isNumeric
public boolean isNumeric()
numeric datatype judgement.- Returns:
- whether it is a numeric datatype
- Throws:
UnSupportedDataTypeException- when meets unSupported DataType
-
isComparable
public boolean isComparable()
comparable datatype judgement.- Returns:
- whether it is a comparable datatype
- Throws:
UnSupportedDataTypeException- when meets unSupported DataType
-
-