| org.geotools.image.io.StreamImageWriter org.geotools.image.io.text.TextImageWriter
All known Subclasses: org.geotools.image.io.text.TextMatrixImageWriter,
TextImageWriter | abstract public class TextImageWriter extends StreamImageWriter (Code) | | Base class for text image encoders. "Text images" are usually ASCII files
containing pixel values (often geophysical values, like sea level anomalies).
since: 2.4 version: $Id: TextImageWriter.java 26833 2007-09-04 18:01:08Z desruisseaux $ author: Martin Desruisseaux |
Method Summary | |
protected void | close() Closes the writer created by
TextImageWriter.getWriter() . | protected strictfp NumberFormat | createNumberFormat(IIOImage image, ImageWriteParam parameters) Returns a number format to be used for formatting the sample values in the given image.
Parameters: image - The image or raster to be written. Parameters: parameters - The write parameters, or null if the whole image will be written. | protected Charset | getCharset(ImageWriteParam parameters) Returns the character set to use for encoding the string to the output stream.
The default implementation returns the
specified to the
Spi object given to this
TextImageWriter constructor.
Subclasses can override this method if they want to specify the character encoding in
some other way.
Parameters: parameters - The write parameters, or null for the defaults. | protected Locale | getDataLocale(ImageWriteParam parameters) Returns the locale to use for encoding values, or
null for the
. | protected FieldPosition | getExpectedFractionPosition(NumberFormat format) Returns the expected position of the fraction part for numbers to be formatted using the
given format. | protected String | getLineSeparator(ImageWriteParam parameters) Returns the line separator to use when writing to the output stream. | protected BufferedWriter | getWriter(ImageWriteParam parameters) Returns the
as an
.
If the output is already a buffered writer, it is returned unchanged. |
TextImageWriter | protected TextImageWriter(ImageWriterSpi provider)(Code) | | Constructs a
TextImageWriter .
Parameters: originatingProvider - The ImageWriterSpi thatis constructing this object, or null . |
createNumberFormat | protected strictfp NumberFormat createNumberFormat(IIOImage image, ImageWriteParam parameters)(Code) | | Returns a number format to be used for formatting the sample values in the given image.
Parameters: image - The image or raster to be written. Parameters: parameters - The write parameters, or null if the whole image will be written. A number format appropriate for the given image. |
getCharset | protected Charset getCharset(ImageWriteParam parameters) throws IOException(Code) | | Returns the character set to use for encoding the string to the output stream.
The default implementation returns the
specified to the
Spi object given to this
TextImageWriter constructor.
Subclasses can override this method if they want to specify the character encoding in
some other way.
Parameters: parameters - The write parameters, or null for the defaults. The character encoding, or null for the platform default encoding. throws: IOException - If reading from the output stream failed. See Also: Spi.charset |
getDataLocale | protected Locale getDataLocale(ImageWriteParam parameters)(Code) | | Returns the locale to use for encoding values, or
null for the
. The default implementation returns the
specified to the
Spi object given to this
TextImageWriter constructor. Subclasses can override this method if they
want to specify the data locale in some other way.
Note: This locale should not be confused with
TextImageWriter.getLocale .
Parameters: parameters - The write parameters, or null for the defaults. The locale to use for parsing numbers in the image file. See Also: Spi.locale |
getExpectedFractionPosition | protected FieldPosition getExpectedFractionPosition(NumberFormat format)(Code) | | Returns the expected position of the fraction part for numbers to be formatted using the
given format. This method should be invoked after
TextImageWriter.createNumberFormat , but the
given format doesn't need to be the instance returned by the later.
Parameters: format - The format to be used for formatting numbers. The expected position of the fraction part.DecimalFormat |
getLineSeparator | protected String getLineSeparator(ImageWriteParam parameters)(Code) | | Returns the line separator to use when writing to the output stream. The default
implementation returns the
specified
to the
Spi object given to this
TextImageWriter constructor. Subclasses
can override this method if they want to specify the line separator in some other way.
Parameters: parameters - The write parameters, or null for the defaults. The line separator to use for writting the image. See Also: Spi.lineSeparator |
|
|