Class BCF2Encoder
- java.lang.Object
-
- htsjdk.variant.variantcontext.writer.BCF2Encoder
-
public final class BCF2Encoder extends Object
See #BCFWriter for documentation on this classes role in encoding BCF2 files- Since:
- 06/12
-
-
Field Summary
Fields Modifier and Type Field Description static int
WRITE_BUFFER_INITIAL_SIZE
-
Constructor Summary
Constructors Constructor Description BCF2Encoder()
-
Method Summary
All Methods Instance Methods Concrete Methods 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 mattervoid
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()
-
-
-
Field Detail
-
WRITE_BUFFER_INITIAL_SIZE
public static final int WRITE_BUFFER_INITIAL_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getRecordBytes
public byte[] getRecordBytes()
-
encodeTypedMissing
public final void encodeTypedMissing(BCF2Type type) throws IOException
- Throws:
IOException
-
encodeTyped
public final void encodeTyped(Object value, BCF2Type type) throws IOException
- Throws:
IOException
-
encodeTypedInt
public final void encodeTypedInt(int v) throws IOException
- Throws:
IOException
-
encodeTypedInt
public final void encodeTypedInt(int v, BCF2Type type) throws IOException
- Throws:
IOException
-
encodeTypedString
public final void encodeTypedString(String s) throws IOException
- Throws:
IOException
-
encodeTypedString
public final void encodeTypedString(byte[] s) throws IOException
- Throws:
IOException
-
encodeTypedFloat
public final void encodeTypedFloat(double d) throws IOException
- Throws:
IOException
-
encodeTyped
public final void encodeTyped(List<? extends Object> v, BCF2Type type) throws IOException
- Throws:
IOException
-
encodeRawValues
public final <T> void encodeRawValues(Collection<T> v, BCF2Type type) throws IOException
- Throws:
IOException
-
encodeRawValue
public final <T> void encodeRawValue(T value, BCF2Type type) throws IOException
- Throws:
IOException
-
encodeRawMissingValue
public final void encodeRawMissingValue(BCF2Type type) throws IOException
- Throws:
IOException
-
encodeRawMissingValues
public final void encodeRawMissingValues(int size, BCF2Type type) throws IOException
- Throws:
IOException
-
encodeRawChar
public final void encodeRawChar(byte c) throws IOException
- Throws:
IOException
-
encodeRawFloat
public final void encodeRawFloat(double value) throws IOException
- Throws:
IOException
-
encodeType
public final void encodeType(int size, BCF2Type type) throws IOException
- Throws:
IOException
-
encodeRawInt
public final void encodeRawInt(int value, BCF2Type type) throws IOException
- Throws:
IOException
-
encodeRawBytes
public final void encodeRawBytes(int value, BCF2Type type) throws IOException
- Throws:
IOException
-
encodeRawString
public void encodeRawString(String s, int sizeToWrite) throws IOException
- Throws:
IOException
-
encode
public final BCF2Type encode(Object o) throws IOException
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- Parameters:
o
-- Returns:
- Throws:
IOException
-
-