public abstract class Encoder extends Object
<encoderType> which represents the type of this encoder| Modifier and Type | Field and Description |
|---|---|
static String |
MAX_POINT_NUMBER |
static String |
MAX_STRING_LENGTH |
| Constructor and Description |
|---|
Encoder(TSEncoding type) |
| Modifier and Type | Method and Description |
|---|---|
void |
encode(BigDecimal value,
ByteArrayOutputStream out) |
void |
encode(Binary value,
ByteArrayOutputStream out) |
void |
encode(boolean value,
ByteArrayOutputStream out) |
void |
encode(double value,
ByteArrayOutputStream out) |
void |
encode(float value,
ByteArrayOutputStream out) |
void |
encode(int value,
ByteArrayOutputStream out) |
void |
encode(long value,
ByteArrayOutputStream out) |
void |
encode(short value,
ByteArrayOutputStream out) |
abstract 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.
|
TSEncoding |
getType() |
void |
setType(TSEncoding type) |
public static final String MAX_STRING_LENGTH
public static final String MAX_POINT_NUMBER
public Encoder(TSEncoding type)
public void setType(TSEncoding type)
public TSEncoding getType()
public void encode(boolean value,
ByteArrayOutputStream out)
public void encode(short value,
ByteArrayOutputStream out)
public void encode(int value,
ByteArrayOutputStream out)
public void encode(long value,
ByteArrayOutputStream out)
public void encode(float value,
ByteArrayOutputStream out)
public void encode(double value,
ByteArrayOutputStream out)
public void encode(Binary value, ByteArrayOutputStream out)
public void encode(BigDecimal value, ByteArrayOutputStream out)
public abstract void flush(ByteArrayOutputStream out) throws IOException
out - - ByteArrayOutputStreamIOException - cannot flush to OutputStreampublic int getOneItemMaxSize()
public long getMaxByteSize()
Copyright © 2022 The Apache Software Foundation. All rights reserved.