public class NexusFileFormat extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
NEW_LINE
New-line symbol.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
parseFile(NexusFileListener listener,
File inputFile)
Parse a file and send events to the given listener.
|
static void |
parseInputStream(NexusFileListener listener,
InputStream inputStream)
Parse a stream and send events to the given listener.
|
static void |
parseReader(NexusFileListener listener,
Reader inputReader)
Parse a reader and send events to the given listener.
|
static void |
writeFile(File file,
NexusFile nexusFile)
Writes the given Nexus output to a file.
|
static void |
writeStream(OutputStream os,
NexusFile nexusFile)
Writes the given Nexus output to a stream.
|
static void |
writeWriter(Writer writer,
NexusFile nexusFile)
Writes the given Nexus output to a writer.
|
public static void parseFile(NexusFileListener listener, File inputFile) throws IOException, ParseException
listener - the listener that will receive events.inputFile - the file to parse.IOException - if anything goes wrong with reading the file.ParseException - if the file format is incorrect.public static void parseInputStream(NexusFileListener listener, InputStream inputStream) throws IOException, ParseException
listener - the listener that will receive events.inputStream - the stream to parse.IOException - if anything goes wrong with reading the stream.ParseException - if the stream format is incorrect.public static void parseReader(NexusFileListener listener, Reader inputReader) throws IOException, ParseException
listener - the listener that will receive events.inputReader - the file to parse.IOException - if anything goes wrong with reading the reader.ParseException - if the reader format is incorrect.public static void writeFile(File file, NexusFile nexusFile) throws IOException
file - the file to write to.nexusFile - the Nexus output to write.IOException - if there is a problem during writing.public static void writeStream(OutputStream os, NexusFile nexusFile) throws IOException
os - the stream to write to.nexusFile - the Nexus output to write.IOException - if there is a problem during writing.public static void writeWriter(Writer writer, NexusFile nexusFile) throws IOException
writer - the writer to write to.nexusFile - the Nexus output to write.IOException - if there is a problem during writing.Copyright © 2014 BioJava. All rights reserved.