SortingCollection.Codec<SAMRecord>
, Cloneable
public class BAMRecordCodec extends Object implements SortingCollection.Codec<SAMRecord>
Constructor | Description |
---|---|
BAMRecordCodec(SAMFileHeader header) |
|
BAMRecordCodec(SAMFileHeader header,
SAMRecordFactory factory) |
Modifier and Type | Method | Description |
---|---|---|
BAMRecordCodec |
clone() |
Must return a cloned copy of the codec that can be used independently of
the original instance.
|
SAMRecord |
decode() |
Read the next record from the input stream and convert into a java object.
|
void |
encode(SAMRecord alignment) |
Write object to OutputStream.
|
void |
setInputStream(InputStream is) |
Sets the input stream that records will be read from.
|
void |
setInputStream(InputStream is,
String filename) |
Sets the input stream that records will be read from.
|
void |
setOutputStream(OutputStream os) |
Sets the output stream that records will be written to.
|
void |
setOutputStream(OutputStream os,
String filename) |
Sets the output stream that records will be written to.
|
public BAMRecordCodec(SAMFileHeader header)
public BAMRecordCodec(SAMFileHeader header, SAMRecordFactory factory)
public BAMRecordCodec clone()
SortingCollection.Codec
clone
in interface SortingCollection.Codec<SAMRecord>
clone
in class Object
public void setOutputStream(OutputStream os)
setOutputStream
in interface SortingCollection.Codec<SAMRecord>
public void setOutputStream(OutputStream os, String filename)
public void setInputStream(InputStream is)
setInputStream
in interface SortingCollection.Codec<SAMRecord>
public void setInputStream(InputStream is, String filename)
public void encode(SAMRecord alignment)
encode
in interface SortingCollection.Codec<SAMRecord>
alignment
- Record to be written.public SAMRecord decode()
decode
in interface SortingCollection.Codec<SAMRecord>