Package htsjdk.samtools.cram.structure

# Class CramHeader

java.lang.Object
htsjdk.samtools.cram.structure.CramHeader

public final class CramHeader extends Object
A CRAM file header, including the file format definition (including CRAM version and content id), and the SAMFileHeader.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`CRAM_HEADER_LENGTH`
`static final int`
`CRAM_ID_LENGTH`
`static final int`
`CRAM_MAGIC_LENGTH`
`static final int`
`CRAM_VERSION_LENGTH`
`static final byte[]`
`MAGIC`

## Constructor Summary

Constructors
Constructor
Description
`CramHeader(CRAMVersion cramVersion, String id)`
Create a new `CramHeader` object with the specified version and id.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object o)`
`CRAMVersion`
`getCRAMVersion()`
`byte[]`
`getId()`
`int`
`hashCode()`

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

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

## Field Details

### MAGIC

public static final byte[] MAGIC

### CRAM_MAGIC_LENGTH

public static final int CRAM_MAGIC_LENGTH

### CRAM_ID_LENGTH

public static final int CRAM_ID_LENGTH

See Also:
  - Constant Field Values

### CRAM_VERSION_LENGTH

public static final int CRAM_VERSION_LENGTH

See Also:
  - Constant Field Values

### CRAM_HEADER_LENGTH

public static final int CRAM_HEADER_LENGTH

## Constructor Details

### CramHeader

public CramHeader(CRAMVersion cramVersion, String id)
Create a new `CramHeader` object with the specified version and id. The id field by default is guaranteed to be byte[20].

Parameters:
  `cramVersion` - the CRAM version to assume
  `id` - an identifier of the content associated with this header

## Method Details

### getId

public byte[] getId()

### getCRAMVersion

public CRAMVersion getCRAMVersion()

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`