org.geotoolkit.image.io.plugin
Class TextMatrixImageWriter

Object
  extended by ImageWriter
      extended by SpatialImageWriter
          extended by StreamImageWriter
              extended by TextImageWriter
                  extended by TextMatrixImageWriter
All Implemented Interfaces:
ImageTranscoder, WarningProducer, Disposable, Localized

public class TextMatrixImageWriter
extends TextImageWriter

An image encoder for matrix of floating-point numbers. The sample values are formatted by an NumberFormat instance. Consequently the format is locale-dependent, unless the locale is explicitly specified either in the Service Provider Interface (ImageWriter.locale) or by overriding the TextImageWriter.getDataLocale(ImageWriteParam) method.

This format is typically used for writing one-banded image. However if an image with more than one band is to be written, then each band is separated by a blank line in the output stream.

Since:
3.08 (derived from 1.2)
Version:
3.08
Author:
Martin Desruisseaux (IRD)
See Also:
TextMatrixImageReader
Module:
coverage/geotk-coverageio (download)    View source code for this class

Nested Class Summary
static class TextMatrixImageWriter.Spi
          Service provider interface (SPI) for TextMatrixImageWriters.
 
Field Summary
 
Fields inherited from class StreamImageWriter
closeOnReset
 
Fields inherited from class ImageWriter
availableLocales, locale, originatingProvider, output, progressListeners, warningListeners, warningLocales
 
Fields inherited from interface WarningProducer
LOGGER
 
Constructor Summary
protected TextMatrixImageWriter(TextMatrixImageWriter.Spi provider)
          Constructs a new image writer.
 
Method Summary
 void write(IIOMetadata streamMetadata, IIOImage image, ImageWriteParam parameters)
          Appends a complete image stream containing a single image.
 
Methods inherited from class TextImageWriter
close, createNumberFormat, getCharset, getDataLocale, getExpectedFractionPosition, getLineSeparator, getWriter
 
Methods inherited from class StreamImageWriter
finalize, getOutputStream, setOutput
 
Methods inherited from class SpatialImageWriter
canWriteRasters, computeSize, convertImageMetadata, convertStreamMetadata, createRectIter, dispose, getDefaultImageMetadata, getDefaultStreamMetadata, getDefaultWriteParam, getSampleModel, processImageComplete, processImageStarted, processThumbnailComplete, processThumbnailStarted, processWarningOccurred, processWarningOccurred, warningOccurred
 
Methods inherited from class ImageWriter
abort, abortRequested, addIIOWriteProgressListener, addIIOWriteWarningListener, canInsertEmpty, canInsertImage, canRemoveImage, canReplaceImageMetadata, canReplacePixels, canReplaceStreamMetadata, canWriteEmpty, canWriteSequence, clearAbortRequest, endInsertEmpty, endReplacePixels, endWriteEmpty, endWriteSequence, getAvailableLocales, getLocale, getNumThumbnailsSupported, getOriginatingProvider, getOutput, getPreferredThumbnailSizes, prepareInsertEmpty, prepareReplacePixels, prepareWriteEmpty, prepareWriteSequence, processImageProgress, processImageStarted, processThumbnailProgress, processThumbnailStarted, processWarningOccurred, processWarningOccurred, processWriteAborted, removeAllIIOWriteProgressListeners, removeAllIIOWriteWarningListeners, removeIIOWriteProgressListener, removeIIOWriteWarningListener, removeImage, replaceImageMetadata, replacePixels, replacePixels, replaceStreamMetadata, reset, setLocale, write, write, writeInsert, writeToSequence
 
Methods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface Localized
getLocale
 

Constructor Detail

TextMatrixImageWriter

protected TextMatrixImageWriter(TextMatrixImageWriter.Spi provider)
Constructs a new image writer.

Parameters:
provider - The ImageWriterSpi that is constructing this object, or null.
Method Detail

write

public void write(IIOMetadata streamMetadata,
                  IIOImage image,
                  ImageWriteParam parameters)
           throws IOException
Appends a complete image stream containing a single image.

Specified by:
write in class ImageWriter
Parameters:
streamMetadata - The stream metadata (ignored in default implementation).
image - The image or raster to be written.
parameters - The write parameters, or null if the whole image will be written.
Throws:
IOException - If an error occurred while writing to the stream.


Copyright © 2009-2012 Geotoolkit.org. All Rights Reserved.