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