public class FASTAFactory extends AbstractStartStringSingleFactory implements SingleReaderWriterFactory, JPhyloIOFormatIDs, FASTAConstants
The checkFormat() methods test, if the content starts with FASTAConstants.NAME_START_CHAR. They will
therefore return false for empty files, which might anyway be FASTA files containing no sequences.
FASTA_FORMAT_ID, FORMAT_ID_PREFIX, MEGA_FORMAT_ID, NEWICK_FORMAT_ID, NEXML_FORMAT_ID, NEXUS_FORMAT_ID, PDE_FORMAT_ID, PHYLIP_FORMAT_ID, PHYLOXML_FORMAT_ID, SEQUENTIAL_PHYLIP_FORMAT_ID, XTG_FORMAT_IDCOMMENT_START_CHAR, DEFAULT_LINE_LENGTH, FASTA_FORMAT_NAME, NAME_START_CHAR| Constructor and Description |
|---|
FASTAFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected JPhyloIOFormatInfo |
createFormatInfo()
Returns the FASTA format info including a file filter that specifies the file extensions listed
here.
|
JPhyloIOEventReader |
getReader(java.io.InputStream stream,
ReadWriteParameterMap parameters)
Creates a new reader instance for the target format of this factory.
|
JPhyloIOEventReader |
getReader(java.io.Reader reader,
ReadWriteParameterMap parameters)
Creates a new reader instance for the target format of this factory.
|
JPhyloIOEventWriter |
getWriter()
Creates a new writer instance for the target format of this factory.
|
boolean |
hasReader()
Determines whether this factory is able to create reader instances for its target format.
|
boolean |
hasWriter()
Determines whether this factory is able to create writer instances for its target format.
|
checkFormat, getExpectedStartcheckFormat, getFormatInfoclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheckFormat, checkFormat, getFormatInfopublic FASTAFactory()
public JPhyloIOEventReader getReader(java.io.InputStream stream, ReadWriteParameterMap parameters) throws java.io.IOException
SingleReaderWriterFactorygetReader in interface SingleReaderWriterFactorystream - the stream to provide the content for the readerparameters - the parameter map for the new reader instancejava.io.IOExceptionpublic JPhyloIOEventReader getReader(java.io.Reader reader, ReadWriteParameterMap parameters) throws java.io.IOException
SingleReaderWriterFactorygetReader in interface SingleReaderWriterFactoryparameters - the parameter map for the new reader instancenull if this factory is not able to create readersjava.io.IOExceptionSingleReaderWriterFactory.hasReader()public JPhyloIOEventWriter getWriter()
SingleReaderWriterFactorygetWriter in interface SingleReaderWriterFactorynull if this factory is not able to create writersSingleReaderWriterFactory.hasWriter()public boolean hasReader()
SingleReaderWriterFactoryhasReader in interface SingleReaderWriterFactorytrue if creating readers is supported or false otherwisepublic boolean hasWriter()
SingleReaderWriterFactoryhasWriter in interface SingleReaderWriterFactorytrue if creating writers is supported or false otherwiseprotected JPhyloIOFormatInfo createFormatInfo()
createFormatInfo in class AbstractSingleReaderWriterFactorySingleReaderWriterFactory.getFormatInfo()