Package htsjdk.variant.variantcontext.writer

# 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 final int`
`WRITE_BUFFER_INITIAL_SIZE`

## Constructor Summary

Constructors
Constructor
Description
`BCF2Encoder()`

## Method Summary

Modifier and Type
Method
Description
`final 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
`final void`
`encodeRawBytes(int value, BCF2Type type)`
`final void`
`encodeRawChar(byte c)`
`final void`
`encodeRawFloat(double value)`
`final void`
`encodeRawInt(int value, BCF2Type type)`
`final void`
`encodeRawMissingValue(BCF2Type type)`
`final void`
`encodeRawMissingValues(int size, BCF2Type type)`
`void`
`encodeRawString(String s, int sizeToWrite)`
`final <T> void`
`encodeRawValue(T value, BCF2Type type)`
`final <T> void`
`encodeRawValues(Collection<T> v, BCF2Type type)`
`final void`
`encodeType(int size, BCF2Type type)`
`final void`
`encodeTyped(Object value, BCF2Type type)`
`final void`
`encodeTyped(List<? extends Object> v, BCF2Type type)`
`final void`
`encodeTypedFloat(double d)`
`final void`
`encodeTypedInt(int v)`
`final void`
`encodeTypedInt(int v, BCF2Type type)`
`final void`
`encodeTypedMissing(BCF2Type type)`
`final void`
`encodeTypedString(byte[] s)`
`final void`
`encodeTypedString(String s)`
`byte[]`
`getRecordBytes()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### WRITE_BUFFER_INITIAL_SIZE

public static final int WRITE_BUFFER_INITIAL_SIZE

See Also:
  - Constant Field Values

## Constructor Details

### BCF2Encoder

public BCF2Encoder()

## Method Details

### 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`