# Class CoreCodec<T>

java.lang.Object
htsjdk.samtools.cram.encoding.core.CoreCodec<T>

Type Parameters:
  `T` - data series type to be read or written

All Implemented Interfaces:
  `CRAMCodec<T>`

Direct Known Subclasses:
  `BetaIntegerCodec`

public abstract class CoreCodec<T> extends Object implements CRAMCodec<T>
Superclass of Codecs which operate on Core Block bit streams Contrast with `htsjdk.samtools.cram.encoding.external.ExternalCodec<T>` for External Block byte streams

## Field Summary

Fields
Modifier and Type
Field
Description
`protected final BitInputStream`
`coreBlockInputStream`
`protected final BitOutputStream`
`coreBlockOutputStream`

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`CoreCodec(BitInputStream coreBlockInputStream, BitOutputStream coreBlockOutputStream)`
Create a new CoreCodec with associated input and output bit streams

## Method Summary

### Methods inherited from class Object

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

### Methods inherited from interface CRAMCodec

`read, read, write`

## Field Details

### coreBlockInputStream

protected final BitInputStream coreBlockInputStream

### coreBlockOutputStream

protected final BitOutputStream coreBlockOutputStream

## Constructor Details

### CoreCodec

protected CoreCodec(BitInputStream coreBlockInputStream, BitOutputStream coreBlockOutputStream)
Create a new CoreCodec with associated input and output bit streams

Parameters:
  `coreBlockInputStream` - bit stream for reading input
  `coreBlockOutputStream` - bit stream for writing output