Class Encoder
- java.lang.Object
-
- org.apache.iotdb.tsfile.encoding.encoder.Encoder
-
- Direct Known Subclasses:
BitmapEncoder,DeltaBinaryEncoder,DictionaryEncoder,FloatEncoder,GorillaEncoderV1,GorillaEncoderV2,IntZigzagEncoder,LongZigzagEncoder,PlainEncoder,RegularDataEncoder,RLBE,RleEncoder,SprintzEncoder
public abstract class Encoder extends java.lang.ObjectThis class is the parent class of all Encoders. Every encoder has a specific<encoderType>which represents the type of this encoder
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringMAX_POINT_NUMBERstatic java.lang.StringMAX_STRING_LENGTH
-
Constructor Summary
Constructors Constructor Description Encoder(TSEncoding type)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidencode(boolean value, java.io.ByteArrayOutputStream out)voidencode(double value, java.io.ByteArrayOutputStream out)voidencode(float value, java.io.ByteArrayOutputStream out)voidencode(int value, java.io.ByteArrayOutputStream out)voidencode(long value, java.io.ByteArrayOutputStream out)voidencode(short value, java.io.ByteArrayOutputStream out)voidencode(java.math.BigDecimal value, java.io.ByteArrayOutputStream out)voidencode(Binary value, java.io.ByteArrayOutputStream out)abstract voidflush(java.io.ByteArrayOutputStream out)Write all values buffered in memory cache to OutputStream.longgetMaxByteSize()The maximal possible memory size occupied by current Encoder.intgetOneItemMaxSize()When encoder accepts a new incoming data point, the maximal possible size in byte it takes to store in memory.TSEncodinggetType()voidsetType(TSEncoding type)
-
-
-
Field Detail
-
MAX_STRING_LENGTH
public static final java.lang.String MAX_STRING_LENGTH
- See Also:
- Constant Field Values
-
MAX_POINT_NUMBER
public static final java.lang.String MAX_POINT_NUMBER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Encoder
public Encoder(TSEncoding type)
-
-
Method Detail
-
setType
public void setType(TSEncoding type)
-
getType
public TSEncoding getType()
-
encode
public void encode(boolean value, java.io.ByteArrayOutputStream out)
-
encode
public void encode(short value, java.io.ByteArrayOutputStream out)
-
encode
public void encode(int value, java.io.ByteArrayOutputStream out)
-
encode
public void encode(long value, java.io.ByteArrayOutputStream out)
-
encode
public void encode(float value, java.io.ByteArrayOutputStream out)
-
encode
public void encode(double value, java.io.ByteArrayOutputStream out)
-
encode
public void encode(Binary value, java.io.ByteArrayOutputStream out)
-
encode
public void encode(java.math.BigDecimal value, java.io.ByteArrayOutputStream out)
-
flush
public abstract void flush(java.io.ByteArrayOutputStream out) throws java.io.IOExceptionWrite all values buffered in memory cache to OutputStream.- Parameters:
out- - ByteArrayOutputStream- Throws:
java.io.IOException- cannot flush to OutputStream
-
getOneItemMaxSize
public int getOneItemMaxSize()
When encoder accepts a new incoming data point, the maximal possible size in byte it takes to store in memory.- Returns:
- the maximal possible size of one data item encoded by this encoder
-
getMaxByteSize
public long getMaxByteSize()
The maximal possible memory size occupied by current Encoder. This statistic value doesn't involve OutputStream.- Returns:
- the maximal size of possible memory occupied by current encoder
-
-