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 voidparse(PHYLIPFileListener listener, BufferedReader reader)static voidparseFile(PHYLIPFileListener listener, File inputFile)static voidparseInputStream(PHYLIPFileListener listener, InputStream inputStream)static voidparseReader(PHYLIPFileListener listener, Reader inputReader)static voidwriteFile(File file, Alignment alignment)Writes the given Alignment in PHYLIP format to a file.static voidwriteStream(OutputStream os, Alignment alignment)Writes the given Alignment in PHYLIP format to a stream.static voidwriteWriter(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:
IOExceptionParseException
-
parseInputStream
public static void parseInputStream(PHYLIPFileListener listener, InputStream inputStream) throws IOException, ParseException
- Throws:
IOExceptionParseException
-
parseReader
public static void parseReader(PHYLIPFileListener listener, Reader inputReader) throws IOException, ParseException
- Throws:
IOExceptionParseException
-
parse
public static void parse(PHYLIPFileListener listener, BufferedReader reader) throws IOException, ParseException
- Throws:
IOExceptionParseException
-
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.
-
-