Class PlainEncoder
- java.lang.Object
-
- org.apache.iotdb.tsfile.encoding.encoder.Encoder
-
- org.apache.iotdb.tsfile.encoding.encoder.PlainEncoder
-
public class PlainEncoder extends Encoder
-
-
Field Summary
-
Fields inherited from class org.apache.iotdb.tsfile.encoding.encoder.Encoder
MAX_POINT_NUMBER, MAX_STRING_LENGTH
-
-
Constructor Summary
Constructors Constructor Description PlainEncoder(TSDataType dataType, int maxStringLength)
-
Method Summary
All Methods Instance 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)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.
-
-
-
Constructor Detail
-
PlainEncoder
public PlainEncoder(TSDataType dataType, int maxStringLength)
-
-
Method Detail
-
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 void flush(java.io.ByteArrayOutputStream out)
Description copied from class:EncoderWrite all values buffered in memory cache to OutputStream.
-
getOneItemMaxSize
public int getOneItemMaxSize()
Description copied from class:EncoderWhen encoder accepts a new incoming data point, the maximal possible size in byte it takes to store in memory.- Overrides:
getOneItemMaxSizein classEncoder- Returns:
- the maximal possible size of one data item encoded by this encoder
-
getMaxByteSize
public long getMaxByteSize()
Description copied from class:EncoderThe maximal possible memory size occupied by current Encoder. This statistic value doesn't involve OutputStream.- Overrides:
getMaxByteSizein classEncoder- Returns:
- the maximal size of possible memory occupied by current encoder
-
-