public final class BCF2Encoder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
WRITE_BUFFER_INITIAL_SIZE |
Constructor and Description |
---|
BCF2Encoder() |
Modifier and Type | Method and Description |
---|---|
BCF2Type |
encode(java.lang.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(java.lang.String s,
int sizeToWrite) |
<T> void |
encodeRawValue(T value,
BCF2Type type) |
<T> void |
encodeRawValues(java.util.Collection<T> v,
BCF2Type type) |
void |
encodeType(int size,
BCF2Type type) |
void |
encodeTyped(java.util.List<? extends java.lang.Object> v,
BCF2Type type) |
void |
encodeTyped(java.lang.Object value,
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(java.lang.String s) |
byte[] |
getRecordBytes() |
public static final int WRITE_BUFFER_INITIAL_SIZE
public byte[] getRecordBytes()
public final void encodeTypedMissing(BCF2Type type) throws java.io.IOException
java.io.IOException
public final void encodeTyped(java.lang.Object value, BCF2Type type) throws java.io.IOException
java.io.IOException
public final void encodeTypedInt(int v) throws java.io.IOException
java.io.IOException
public final void encodeTypedInt(int v, BCF2Type type) throws java.io.IOException
java.io.IOException
public final void encodeTypedString(java.lang.String s) throws java.io.IOException
java.io.IOException
public final void encodeTypedString(byte[] s) throws java.io.IOException
java.io.IOException
public final void encodeTypedFloat(double d) throws java.io.IOException
java.io.IOException
public final void encodeTyped(java.util.List<? extends java.lang.Object> v, BCF2Type type) throws java.io.IOException
java.io.IOException
public final <T> void encodeRawValues(java.util.Collection<T> v, BCF2Type type) throws java.io.IOException
java.io.IOException
public final <T> void encodeRawValue(T value, BCF2Type type) throws java.io.IOException
java.io.IOException
public final void encodeRawMissingValue(BCF2Type type) throws java.io.IOException
java.io.IOException
public final void encodeRawMissingValues(int size, BCF2Type type) throws java.io.IOException
java.io.IOException
public final void encodeRawChar(byte c) throws java.io.IOException
java.io.IOException
public final void encodeRawFloat(double value) throws java.io.IOException
java.io.IOException
public final void encodeType(int size, BCF2Type type) throws java.io.IOException
java.io.IOException
public final void encodeRawInt(int value, BCF2Type type) throws java.io.IOException
java.io.IOException
public final void encodeRawBytes(int value, BCF2Type type) throws java.io.IOException
java.io.IOException
public void encodeRawString(java.lang.String s, int sizeToWrite) throws java.io.IOException
java.io.IOException
public final BCF2Type encode(java.lang.Object o) throws java.io.IOException
o
- java.io.IOException