|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojavax.bio.phylo.io.nexus.NexusFileFormat
public class NexusFileFormat
Reads/writes Nexus files and fires events at a NexusFileListener object. Blocks are parsed using NexusBlockParser objects provided at runtime. Each of those objects should probably have a NexusBlockListener object associated with them that receives events generated from the processed data in the block.
Field Summary | |
---|---|
static java.lang.String |
NEW_LINE
New-line symbol. |
Method Summary | |
---|---|
static void |
parseFile(NexusFileListener listener,
java.io.File inputFile)
Parse a file and send events to the given listener. |
static void |
parseInputStream(NexusFileListener listener,
java.io.InputStream inputStream)
Parse a stream and send events to the given listener. |
static void |
parseReader(NexusFileListener listener,
java.io.Reader inputReader)
Parse a reader and send events to the given listener. |
static void |
writeFile(java.io.File file,
NexusFile nexusFile)
Writes the given Nexus output to a file. |
static void |
writeStream(java.io.OutputStream os,
NexusFile nexusFile)
Writes the given Nexus output to a stream. |
static void |
writeWriter(java.io.Writer writer,
NexusFile nexusFile)
Writes the given Nexus output to a writer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String NEW_LINE
Method Detail |
---|
public static void parseFile(NexusFileListener listener, java.io.File inputFile) throws java.io.IOException, ParseException
listener
- the listener that will receive events.inputFile
- the file to parse.
java.io.IOException
- if anything goes wrong with reading the file.
ParseException
- if the file format is incorrect.public static void parseInputStream(NexusFileListener listener, java.io.InputStream inputStream) throws java.io.IOException, ParseException
listener
- the listener that will receive events.inputStream
- the stream to parse.
java.io.IOException
- if anything goes wrong with reading the stream.
ParseException
- if the stream format is incorrect.public static void parseReader(NexusFileListener listener, java.io.Reader inputReader) throws java.io.IOException, ParseException
listener
- the listener that will receive events.inputReader
- the file to parse.
java.io.IOException
- if anything goes wrong with reading the reader.
ParseException
- if the reader format is incorrect.public static void writeFile(java.io.File file, NexusFile nexusFile) throws java.io.IOException
file
- the file to write to.nexusFile
- the Nexus output to write.
java.io.IOException
- if there is a problem during writing.public static void writeStream(java.io.OutputStream os, NexusFile nexusFile) throws java.io.IOException
os
- the stream to write to.nexusFile
- the Nexus output to write.
java.io.IOException
- if there is a problem during writing.public static void writeWriter(java.io.Writer writer, NexusFile nexusFile) throws java.io.IOException
writer
- the writer to write to.nexusFile
- the Nexus output to write.
java.io.IOException
- if there is a problem during writing.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |