public final class BCF2Encoder extends Object
Modifier and Type | Field | Description |
---|---|---|
static int |
WRITE_BUFFER_INITIAL_SIZE |
Constructor | Description |
---|---|
BCF2Encoder() |
Modifier and Type | Method | Description |
---|---|---|
BCF2Type |
encode(Object o) |
Totally generic encoder that examines o, determines the best way to encode it, and encodes it
This method is incredibly slow, but it's only used for UnitTests so it doesn't matter
|
void |
encodeRawBytes(int value,
BCF2Type type) |
|
void |
encodeRawChar(byte c) |
|
void |
encodeRawFloat(double value) |
|
void |
encodeRawInt(int value,
BCF2Type type) |
|
void |
encodeRawMissingValue(BCF2Type type) |
|
void |
encodeRawMissingValues(int size,
BCF2Type type) |
|
void |
encodeRawString(String s,
int sizeToWrite) |
|
<T> void |
encodeRawValue(T value,
BCF2Type type) |
|
<T> void |
encodeRawValues(Collection<T> v,
BCF2Type type) |
|
void |
encodeType(int size,
BCF2Type type) |
|
void |
encodeTyped(Object value,
BCF2Type type) |
|
void |
encodeTyped(List<? extends Object> v,
BCF2Type type) |
|
void |
encodeTypedFloat(double d) |
|
void |
encodeTypedInt(int v) |
|
void |
encodeTypedInt(int v,
BCF2Type type) |
|
void |
encodeTypedMissing(BCF2Type type) |
|
void |
encodeTypedString(byte[] s) |
|
void |
encodeTypedString(String s) |
|
byte[] |
getRecordBytes() |
public static final int WRITE_BUFFER_INITIAL_SIZE
public byte[] getRecordBytes()
public final void encodeTypedMissing(BCF2Type type) throws IOException
IOException
public final void encodeTyped(Object value, BCF2Type type) throws IOException
IOException
public final void encodeTypedInt(int v) throws IOException
IOException
public final void encodeTypedInt(int v, BCF2Type type) throws IOException
IOException
public final void encodeTypedString(String s) throws IOException
IOException
public final void encodeTypedString(byte[] s) throws IOException
IOException
public final void encodeTypedFloat(double d) throws IOException
IOException
public final void encodeTyped(List<? extends Object> v, BCF2Type type) throws IOException
IOException
public final <T> void encodeRawValues(Collection<T> v, BCF2Type type) throws IOException
IOException
public final <T> void encodeRawValue(T value, BCF2Type type) throws IOException
IOException
public final void encodeRawMissingValue(BCF2Type type) throws IOException
IOException
public final void encodeRawMissingValues(int size, BCF2Type type) throws IOException
IOException
public final void encodeRawChar(byte c) throws IOException
IOException
public final void encodeRawFloat(double value) throws IOException
IOException
public final void encodeType(int size, BCF2Type type) throws IOException
IOException
public final void encodeRawInt(int value, BCF2Type type) throws IOException
IOException
public final void encodeRawBytes(int value, BCF2Type type) throws IOException
IOException
public void encodeRawString(String s, int sizeToWrite) throws IOException
IOException
public final BCF2Type encode(Object o) throws IOException
o
- IOException