Java Doc for TextImageWriter.java in  » GIS » GeoTools-2.4.1 » org » geotools » image » io » text » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoTools 2.4.1 » org.geotools.image.io.text 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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

Inner Class :abstract public static class Spi extends StreamImageWriter.Spi


Constructor Summary
protected  TextImageWriter(ImageWriterSpi provider)
     Constructs a TextImageWriter .

Method Summary
protected  voidclose()
     Closes the writer created by TextImageWriter.getWriter() .
protected strictfp  NumberFormatcreateNumberFormat(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  CharsetgetCharset(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  LocalegetDataLocale(ImageWriteParam parameters)
     Returns the locale to use for encoding values, or null for the .
protected  FieldPositiongetExpectedFractionPosition(NumberFormat format)
     Returns the expected position of the fraction part for numbers to be formatted using the given format.
protected  StringgetLineSeparator(ImageWriteParam parameters)
     Returns the line separator to use when writing to the output stream.
protected  BufferedWritergetWriter(ImageWriteParam parameters)
     Returns the as an . If the output is already a buffered writer, it is returned unchanged.


Constructor Detail
TextImageWriter
protected TextImageWriter(ImageWriterSpi provider)(Code)
Constructs a TextImageWriter .
Parameters:
  originatingProvider - The ImageWriterSpi thatis constructing this object, or null .




Method Detail
close
protected void close() throws IOException(Code)
Closes the writer created by TextImageWriter.getWriter() . This method does nothing if the writer is the instance given by the user rather than a writer created by this class from a File or URL output.
See Also:   TextImageWriter.closeOnReset



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



getWriter
protected BufferedWriter getWriter(ImageWriteParam parameters) throws IllegalStateException, IOException(Code)
Returns the as an . If the output is already a buffered writer, it is returned unchanged. Otherwise this method creates a new from various output types including File , URL , URLConnection , Writer , OutputStream and ImageOutputStream .

This method creates a new only when first invoked. All subsequent calls will returns the same instance. Consequently, the returned writer should never be closed by the caller. It may be automatically when TextImageWriter.setOutput setOutput(Object) , TextImageWriter.reset() reset() or TextImageWriter.dispose()dispose() methods are invoked.
Parameters:
  parameters - The write parameters, or null for the defaults. TextImageWriter.getOutput as a BufferedWriter.
throws:
  IllegalStateException - if the is not set.
throws:
  IOException - If the output stream can't be created for an other reason.
See Also:   TextImageWriter.getOutput
See Also:   TextImageWriter.getOutputStream




Fields inherited from org.geotools.image.io.StreamImageWriter
protected Object closeOnReset(Code)(Java Doc)

Methods inherited from org.geotools.image.io.StreamImageWriter
protected void close() throws IOException(Code)(Java Doc)
public void dispose()(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
protected OutputStream getOutputStream() throws IllegalStateException, IOException(Code)(Java Doc)
public void reset()(Code)(Java Doc)
public void setOutput(Object output)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.