public class IntervalCodec extends java.lang.Object implements SortingCollection.Codec<Interval>
| Constructor and Description |
|---|
IntervalCodec(SAMSequenceDictionary dict)
Creates a new binary codec to read or write.
|
| Modifier and Type | Method and Description |
|---|---|
IntervalCodec |
clone()
Must return a cloned copy of the codec that can be used independently of
the original instance.
|
Interval |
decode()
Reads an interval from the input stream.
|
void |
encode(Interval interval)
Writes the interval to the output stream.
|
void |
setInputStream(java.io.InputStream is)
Sets the input stream that records will be read from.
|
void |
setInputStream(java.io.InputStream is,
java.lang.String filename)
Sets the input stream that records will be read from.
|
void |
setOutputStream(java.io.OutputStream os)
Sets the output stream that records will be written to.
|
void |
setOutputStream(java.io.OutputStream os,
java.lang.String filename)
Sets the output stream that records will be written to.
|
public IntervalCodec(SAMSequenceDictionary dict)
dict - the sequence dictionary associated with the intervals.public IntervalCodec clone()
SortingCollection.Codecclone in interface SortingCollection.Codec<Interval>clone in class java.lang.Objectpublic void setOutputStream(java.io.OutputStream os)
setOutputStream in interface SortingCollection.Codec<Interval>public void setOutputStream(java.io.OutputStream os,
java.lang.String filename)
public void setInputStream(java.io.InputStream is)
setInputStream in interface SortingCollection.Codec<Interval>public void setInputStream(java.io.InputStream is,
java.lang.String filename)
public void encode(Interval interval)
encode in interface SortingCollection.Codec<Interval>interval - the interval to write.public Interval decode()
decode in interface SortingCollection.Codec<Interval>