public interface HistoryFlavorCodec
It will be used to import and export data from the store and forward system, and the binary encoding will be used to store the the data cache.
Versioning If a codec changes over time, new instances should be registered for each version. On export or new data, the latest version will be used, but on decode the correct version will be retrieved.
Modifier and Type | Interface and Description |
---|---|
static class |
HistoryFlavorCodec.TextFormat |
Modifier and Type | Field and Description |
---|---|
static HistoryFlavorCodec.TextFormat |
CSV |
static HistoryFlavorCodec.TextFormat |
JSON |
static HistoryFlavorCodec.TextFormat |
XML |
Modifier and Type | Method and Description |
---|---|
HistoricalData |
decode(byte[] bytes) |
HistoricalData |
decodeText(java.io.Reader r,
HistoryFlavorCodec.TextFormat fmt) |
byte[] |
encode(HistoricalData data) |
void |
encodeText(java.io.Writer w,
HistoricalData data,
HistoryFlavorCodec.TextFormat fmt) |
java.util.List<HistoryFlavorCodec.TextFormat> |
getSupportedTextFormats() |
int |
version()
Returns the version of this codec instance.
|
static final HistoryFlavorCodec.TextFormat XML
static final HistoryFlavorCodec.TextFormat CSV
static final HistoryFlavorCodec.TextFormat JSON
int version()
byte[] encode(HistoricalData data)
HistoricalData decode(byte[] bytes)
java.util.List<HistoryFlavorCodec.TextFormat> getSupportedTextFormats()
void encodeText(java.io.Writer w, HistoricalData data, HistoryFlavorCodec.TextFormat fmt) throws java.io.IOException
java.io.IOException
HistoricalData decodeText(java.io.Reader r, HistoryFlavorCodec.TextFormat fmt) throws java.io.IOException
java.io.IOException