## org.biojava.bio.program.gff
Class GFFWriter

    java.lang.Object
      |
      +--org.biojava.bio.program.gff.GFFWriter

public class GFFWriter
extends java.lang.Object
implements GFFDocumentHandler

Listens to a stream of GFF events and writes the lines to a PrintWriter.

This will ignore all exceptions. Mabey the error-handeling needs to move into an error handeling interface?

Author:
  Matthew Pocock

Constructor Summary
`GFFWriter(java.io.PrintWriter out)` Create a new GFFWriter that will write to out.

Method Summary
`void` `commentLine(java.lang.String comment)` Prints the comment directly to the PrintWriter after adding a leading '`#`'.
`void` `endDocument()` Flushes the PrintWriter to make sure that everything is written.
`void` `invalidEnd(java.lang.String token, java.lang.NumberFormatException nfe)`
`void` `invalidFrame(java.lang.String token, java.lang.NumberFormatException nfe)`
`void` `invalidScore(java.lang.String token, java.lang.NumberFormatException nfe)`
`void` `invalidStart(java.lang.String token, java.lang.NumberFormatException nfe)`
`void` `invalidStrand(java.lang.String token)`
`void` `recordLine(GFFRecord record)` Prints record to the PrintWriter.
`void` `startDocument(java.lang.String locator)` Indicates that a new GFF document has been started.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### GFFWriter

    public GFFWriter(java.io.PrintWriter out)

  Create a new GFFWriter that will write to out.
  Parameters:
    `out` - the PrintWriter to write to

Method Detail

### startDocument

    public void startDocument(java.lang.String locator)

  Description copied from interface: GFFDocumentHandler
  Indicates that a new GFF document has been started. This gives you a hook to set up per-document resources.
  Specified by:
    startDocument in interface GFFDocumentHandler
  Tags copied from interface: GFFDocumentHandler
  Parameters:
    `locator` - A URI for the stream being parsed.

### endDocument

    public void endDocument()

  Flushes the PrintWriter to make sure that everything is written.
  Specified by:
    endDocument in interface GFFDocumentHandler

### commentLine

    public void commentLine(java.lang.String comment)

  Prints the comment directly to the PrintWriter after adding a leading '`#`'.
  Specified by:
    commentLine in interface GFFDocumentHandler
  Tags copied from interface: GFFDocumentHandler
  Parameters:
    `comment` - the comment String

### recordLine

    public void recordLine(GFFRecord record)

  Prints record to the PrintWriter.
  Specified by:
    recordLine in interface GFFDocumentHandler
  Tags copied from interface: GFFDocumentHandler
  Parameters:
    `record` - the GFFRecord containing all the info

### invalidStart

    public void invalidStart(java.lang.String token,
                             java.lang.NumberFormatException nfe)
                      throws BioException

### invalidEnd

    public void invalidEnd(java.lang.String token,
                           java.lang.NumberFormatException nfe)
                    throws BioException

### invalidScore

    public void invalidScore(java.lang.String token,
                             java.lang.NumberFormatException nfe)
                      throws BioException

### invalidStrand

    public void invalidStrand(java.lang.String token)
                       throws BioException

### invalidFrame

    public void invalidFrame(java.lang.String token,
                             java.lang.NumberFormatException nfe)
                      throws BioException