info.bioinfweb.jphyloio.factory

## Class AbstractSingleReaderWriterFactory

- java.lang.Object
- - info.bioinfweb.jphyloio.factory.AbstractSingleReaderWriterFactory

- All Implemented Interfaces:
    SingleReaderWriterFactory
  Direct Known Subclasses:
    AbstractPhylipFactory, AbstractStartStringSingleFactory, AbstractXMLFactory, NewickFactory

      public abstract class AbstractSingleReaderWriterFactory
      extends java.lang.Object
      implements SingleReaderWriterFactory

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractSingleReaderWriterFactory()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `checkFormat(java.io.InputStream stream, ReadWriteParameterMap parameters)` Implementations should read the start of the stream here and determine whether the content could be valid according to the target format.
    `protected abstract JPhyloIOFormatInfo` | `createFormatInfo()`
    `JPhyloIOFormatInfo` | `getFormatInfo()` Returns an information objects describing the target format and providing according file filters.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface info.bioinfweb.jphyloio.factory.SingleReaderWriterFactory

      `checkFormat, getReader, getReader, getWriter, hasReader, hasWriter`

- - ### Constructor Detail

    - #### AbstractSingleReaderWriterFactory

          public AbstractSingleReaderWriterFactory()

  - ### Method Detail

    - #### checkFormat

          public boolean checkFormat(java.io.InputStream stream,
                                     ReadWriteParameterMap parameters)
                              throws java.lang.Exception

      Description copied from interface: `SingleReaderWriterFactory`
      Implementations should read the start of the stream here and determine whether the content could be valid according to the target format.
      Specified by:
        `checkFormat` in interface `SingleReaderWriterFactory`
      Parameters:
        `stream` - the stream to read the first bytes from
        `parameters` - the parameters map that would also be used to create a reader
      Returns:
        `true` if the tested stream may be in the target format or `false` if the stream is not in valid target format
      Throws:
        `java.lang.Exception`

    - #### createFormatInfo

          protected abstract JPhyloIOFormatInfo createFormatInfo()

    - #### getFormatInfo

          public JPhyloIOFormatInfo getFormatInfo()

      Description copied from interface: `SingleReaderWriterFactory`
      Returns an information objects describing the target format and providing according file filters.
      Specified by:
        `getFormatInfo` in interface `SingleReaderWriterFactory`
      Returns:
        the format information object