## loci.formats
Class FormatWriter

    java.lang.Object
      loci.formats.FormatHandler
          loci.formats.FormatWriter

Direct Known Subclasses:
  AVIWriter, ImageWriter, JPEGWriter, QTWriter, TiffWriter

public abstract class FormatWriter
extends FormatHandler

Abstract superclass of all biological file format writers.

Field Summary
`protected int` `fps` Frame rate to use when writing in frames per second, if applicable.

Fields inherited from class loci.formats.FormatHandler
`chooser, currentId, filters, format, suffixes`

Constructor Summary
`FormatWriter(String format, String suffix)` Constructs a format writer with the given name and default suffix.
`FormatWriter(String format, String[] suffixes)` Constructs a format writer with the given name and default suffixes.

Method Summary
`int` `getFramesPerSecond()` Gets the frames per second to use when writing.
`void` `save(String id, Image[] images)` Saves the given images to the specified file.
`abstract void` `save(String id, Image image, boolean last)` Saves the given image to the specified (possibly already open) file.
`void` `setFramesPerSecond(int fps)` Sets the frames per second to use when writing.
`void` `testConvert(String[] args)` A utility method for converting a file from the command line.

Methods inherited from class loci.formats.FormatHandler
`createFilters, getFileChooser, getFileFilters, getFormat, getSuffixes, isThisType`

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

Field Detail

### fps

    protected int fps

  Frame rate to use when writing in frames per second, if applicable.

Constructor Detail

### FormatWriter

    public FormatWriter(String format,
                        String suffix)

  Constructs a format writer with the given name and default suffix.

### FormatWriter

    public FormatWriter(String format,
                        String[] suffixes)

  Constructs a format writer with the given name and default suffixes.

Method Detail

### save

    public abstract void save(String id,
                              Image image,
                              boolean last)
                       throws FormatException,
                              IOException

  Saves the given image to the specified (possibly already open) file. If this image is the last one in the file, the last flag must be set.

  Throws:
    `FormatException`
    `IOException`

### save

    public void save(String id,
                     Image[] images)
              throws FormatException,
                     IOException

  Saves the given images to the specified file.

  Throws:
    `FormatException`
    `IOException`

### setFramesPerSecond

    public void setFramesPerSecond(int fps)

  Sets the frames per second to use when writing.

### getFramesPerSecond

    public int getFramesPerSecond()

  Gets the frames per second to use when writing.

### testConvert

    public void testConvert(String[] args)
                     throws FormatException,
                            IOException

  A utility method for converting a file from the command line.

  Throws:
    `FormatException`
    `IOException`