public static class RegularDataEncoder.IntRegularEncoder extends RegularDataEncoder
RegularDataEncoder.IntRegularEncoder, RegularDataEncoder.LongRegularEncoderBLOCK_DEFAULT_SIZE, blockSize, dataTotal, isMissingPoint, out, writeIndexMAX_POINT_NUMBER, MAX_STRING_LENGTH| Constructor and Description |
|---|
IntRegularEncoder()
constructor of IntRegularEncoder which is a sub-class of RegularDataEncoder.
|
IntRegularEncoder(int size)
constructor of RegularDataEncoder.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkMissingPoint(ByteArrayOutputStream out) |
void |
encode(int value,
ByteArrayOutputStream out) |
void |
encodeValue(int value,
ByteArrayOutputStream out)
input a integer or long value.
|
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.
|
protected void |
reset() |
protected void |
writeBitmap(ByteArrayOutputStream out) |
protected void |
writeHeader() |
flush, flushBlockBuffer, writeHeaderToBytespublic IntRegularEncoder()
public IntRegularEncoder(int size)
size - - the number how many numbers to be packed into a block.protected void reset()
reset in class RegularDataEncoderprotected void writeHeader()
throws IOException
writeHeader in class RegularDataEncoderIOExceptionpublic void encode(int value,
ByteArrayOutputStream out)
public int getOneItemMaxSize()
EncodergetOneItemMaxSize in class Encoderpublic long getMaxByteSize()
EncodergetMaxByteSize in class Encoderprotected void checkMissingPoint(ByteArrayOutputStream out) throws IOException
checkMissingPoint in class RegularDataEncoderIOExceptionprotected void writeBitmap(ByteArrayOutputStream out) throws IOException
writeBitmap in class RegularDataEncoderIOExceptionpublic void encodeValue(int value,
ByteArrayOutputStream out)
throws IOException
value - value to encodeout - - the ByteArrayOutputStream which data encode intoIOExceptionCopyright © 2022 The Apache Software Foundation. All rights reserved.