public final class CramHeader
extends java.lang.Object
CramHeader holds 2 things: 1. File format definition, including content id and
version information 2. SAM file header| Modifier and Type | Field and Description |
|---|---|
static byte[] |
MAGIC |
| Constructor and Description |
|---|
CramHeader(Version version,
java.lang.String id,
SAMFileHeader samFileHeader)
Create a new
CramHeader object with the specified version, id and SAM file header. |
| Modifier and Type | Method and Description |
|---|---|
CramHeader |
clone()
Copy the CRAM header into a new
CramHeader object. |
boolean |
equals(java.lang.Object obj)
Checks if content of a header is the same as this one.
|
byte[] |
getId() |
SAMFileHeader |
getSamFileHeader()
Get the
SAMFileHeader object associated with this CRAM file header. |
Version |
getVersion() |
void |
setID(java.lang.String stringID)
Set the id of the header.
|
void |
setVersion(Version version) |
public CramHeader(Version version, java.lang.String id, SAMFileHeader samFileHeader)
CramHeader object with the specified version, id and SAM file header.
The id field by default is guaranteed to be byte[20].version - the CRAM version to assumeid - an identifier of the content associated with this headersamFileHeader - the SAM file headerpublic void setID(java.lang.String stringID)
stringID - a new id; only first 20 bytes from byte representation of java String will be used.public CramHeader clone()
CramHeader object.clone in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - another header to compare topublic SAMFileHeader getSamFileHeader()
SAMFileHeader object associated with this CRAM file header.public byte[] getId()
public Version getVersion()
public void setVersion(Version version)