public class FloatEncoder extends Encoder
float encoder: <maxPointvalue> <encoded-data>
maxPointvalue := number for accuracy of decimal places, store as unsigned var int
encoded-data := same as encoder's pattern
MAX_POINT_NUMBER, MAX_STRING_LENGTH| Constructor and Description |
|---|
FloatEncoder(TSEncoding encodingType,
TSDataType dataType,
int maxPointNumber) |
| Modifier and Type | Method and Description |
|---|---|
void |
encode(double value,
ByteArrayOutputStream out) |
void |
encode(float value,
ByteArrayOutputStream out) |
void |
flush(ByteArrayOutputStream out)
Write all values buffered in memory cache to OutputStream.
|
long |
getMaxByteSize()
The maximal possible memory size occupied by current Encoder.
|
int |
getOneItemMaxSize()
When encoder accepts a new incoming data point, the maximal possible size in byte it takes to
store in memory.
|
public FloatEncoder(TSEncoding encodingType, TSDataType dataType, int maxPointNumber)
public void encode(float value,
ByteArrayOutputStream out)
public void encode(double value,
ByteArrayOutputStream out)
public void flush(ByteArrayOutputStream out) throws IOException
Encoderflush in class Encoderout - - ByteArrayOutputStreamIOException - cannot flush to OutputStreampublic int getOneItemMaxSize()
EncodergetOneItemMaxSize in class Encoderpublic long getMaxByteSize()
EncodergetMaxByteSize in class EncoderCopyright © 2022 The Apache Software Foundation. All rights reserved.