Package org.biojava.bio.seq.io
Class StreamWriter
- java.lang.Object
-
- org.biojava.bio.seq.io.StreamWriter
-
public class StreamWriter extends Object
Writes all of the sequences from a SequenceIterator to a stream with a particular format.This can be wired from a StreamReader to make a simple file-format conversion utility, or can be used to write out the sequences in a database to disk.
More functionality is offered by
RichStreamWriter
, Use of this interface is prefered.- Author:
- Matthew Pocock
- See Also:
RichStreamWriter
-
-
Constructor Summary
Constructors Constructor Description StreamWriter(OutputStream os, SequenceFormat format)
Generate a new StreamWriter to the stream os and using format.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
writeStream(SequenceIterator ss)
Write each of the sequences in ss to the stream in the given format.
-
-
-
Constructor Detail
-
StreamWriter
public StreamWriter(OutputStream os, SequenceFormat format)
Generate a new StreamWriter to the stream os and using format.- Parameters:
os
- the OutputStream to write toformat
- the SequenceFormat to write with
-
-
Method Detail
-
writeStream
public void writeStream(SequenceIterator ss) throws IOException
Write each of the sequences in ss to the stream in the given format.- Parameters:
ss
- the SequenceIterator to loop over- Throws:
IOException
- if the stream has any problems
-
-