public class FreqEncoder extends Encoder
| Modifier and Type | Class and Description |
|---|---|
protected class |
FreqEncoder.Point |
| Modifier and Type | Field and Description |
|---|---|
protected static int |
BLOCK_DEFAULT_SIZE |
protected static double |
DEFAULT_SNR |
static String |
FREQ_ENCODING_BLOCK_SIZE |
static String |
FREQ_ENCODING_SNR |
protected int |
writeIndex |
MAX_POINT_NUMBER, MAX_STRING_LENGTH| Constructor and Description |
|---|
FreqEncoder() |
FreqEncoder(int size) |
FreqEncoder(int size,
double snr) |
| Modifier and Type | Method and Description |
|---|---|
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 |
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 static final String FREQ_ENCODING_SNR
public static final String FREQ_ENCODING_BLOCK_SIZE
protected static final int BLOCK_DEFAULT_SIZE
protected static final double DEFAULT_SNR
protected int writeIndex
public FreqEncoder()
public FreqEncoder(int size)
public FreqEncoder(int size,
double snr)
public void encode(double value,
ByteArrayOutputStream out)
public void encode(float value,
ByteArrayOutputStream out)
public void encode(int value,
ByteArrayOutputStream out)
public void encode(long value,
ByteArrayOutputStream out)
public void flush(ByteArrayOutputStream out)
Encoderpublic int getOneItemMaxSize()
EncodergetOneItemMaxSize in class Encoderpublic long getMaxByteSize()
EncodergetMaxByteSize in class EncoderCopyright © 2022 The Apache Software Foundation. All rights reserved.