Package org.biojavax.bio.phylo.io.phylip
Class PHYLIPFileFormat
- java.lang.Object
-
- org.biojavax.bio.phylo.io.phylip.PHYLIPFileFormat
-
public class PHYLIPFileFormat extends Object
Reads PHYLIP interleaved alignment files and fires events at a PHYLIPFileListener object.- Since:
- 1.6
- Author:
- Richard Holland, Tobias Thierer, Jim Balhoff
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
parse(PHYLIPFileListener listener, BufferedReader reader)
static void
parseFile(PHYLIPFileListener listener, File inputFile)
static void
parseInputStream(PHYLIPFileListener listener, InputStream inputStream)
static void
parseReader(PHYLIPFileListener listener, Reader inputReader)
static void
writeFile(File file, Alignment alignment)
Writes the given Alignment in PHYLIP format to a file.static void
writeStream(OutputStream os, Alignment alignment)
Writes the given Alignment in PHYLIP format to a stream.static void
writeWriter(Writer writer, Alignment alignment)
Writes the given Alignment in PHYLIP format to a writer.
-
-
-
Method Detail
-
parseFile
public static void parseFile(PHYLIPFileListener listener, File inputFile) throws IOException, ParseException
- Throws:
IOException
ParseException
-
parseInputStream
public static void parseInputStream(PHYLIPFileListener listener, InputStream inputStream) throws IOException, ParseException
- Throws:
IOException
ParseException
-
parseReader
public static void parseReader(PHYLIPFileListener listener, Reader inputReader) throws IOException, ParseException
- Throws:
IOException
ParseException
-
parse
public static void parse(PHYLIPFileListener listener, BufferedReader reader) throws IOException, ParseException
- Throws:
IOException
ParseException
-
writeFile
public static void writeFile(File file, Alignment alignment) throws IOException
Writes the given Alignment in PHYLIP format to a file.- Parameters:
file
- the file to write to.alignment
- the Alignment object to write.- Throws:
IOException
- if there is a problem during writing.
-
writeStream
public static void writeStream(OutputStream os, Alignment alignment) throws IOException
Writes the given Alignment in PHYLIP format to a stream.- Parameters:
os
- the stream to write to.alignment
- the Alignment object to write.- Throws:
IOException
- if there is a problem during writing.
-
writeWriter
public static void writeWriter(Writer writer, Alignment alignment) throws IOException
Writes the given Alignment in PHYLIP format to a writer.- Parameters:
writer
- the writer to write to.alignment
- the Alignment object to write.- Throws:
IOException
- if there is a problem during writing.
-
-