# Class ExternalEncoding<T>

java.lang.Object
htsjdk.samtools.cram.encoding.CRAMEncoding<T>
htsjdk.samtools.cram.encoding.external.ExternalEncoding<T>

Direct Known Subclasses:
  `ExternalByteArrayEncoding, ExternalByteEncoding, ExternalIntegerEncoding, ExternalLongEncoding`

public abstract class ExternalEncoding<T> extends CRAMEncoding<T>

## Field Summary

Fields
Modifier and Type
Field
Description
`protected final int`
`externalBlockContentId`

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`ExternalEncoding(int externalBlockContentId)`

## Method Summary

Modifier and Type
Method
Description
`byte[]`
`toSerializedEncodingParams()`
Serialize encoding parameters to an ITF8-encoded byte array.
`String`
`toString()`

### Methods inherited from class CRAMEncoding

`buildCodec, buildReadCodec, buildWriteCodec, id, toEncodingDescriptor`

### Methods inherited from class Object

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

## Field Details

### externalBlockContentId

protected final int externalBlockContentId

## Constructor Details

### ExternalEncoding

protected ExternalEncoding(int externalBlockContentId)

## Method Details

### toSerializedEncodingParams

public byte[] toSerializedEncodingParams()
Description copied from class: `CRAMEncoding`
Serialize encoding parameters to an ITF8-encoded byte array. By convention, each subclass should have a corresponding and symmetric "fromSerializedEncodingParams" that returns a new instance of that encoding populated with values from the serialized encoding params.

Specified by:
  `toSerializedEncodingParams` in class `CRAMEncoding<T>`
Returns:
  a byte array containing the encoding's parameter values encoded as an ITF8 stream.

### toString

public String toString()

Overrides:
  `toString` in class `Object`