Java Doc for TIFFCompressor.java in  » 6.0-JDK-Modules » Java-Advanced-Imaging » com » sun » media » imageio » plugins » tiff » 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 » 6.0 JDK Modules » Java Advanced Imaging » com.sun.media.imageio.plugins.tiff 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.media.imageio.plugins.tiff.TIFFCompressor

All known Subclasses:   com.sun.media.imageioimpl.plugins.tiff.TIFFPackBitsCompressor,  com.sun.media.imageioimpl.plugins.tiff.TIFFNullCompressor,  com.sun.media.imageioimpl.plugins.tiff.TIFFLSBCompressor,  com.sun.media.imageioimpl.plugins.tiff.TIFFFaxCompressor,  com.sun.media.imageioimpl.plugins.tiff.TIFFLZWCompressor,  com.sun.media.imageioimpl.plugins.tiff.TIFFBaseJPEGCompressor,  com.sun.media.imageioimpl.plugins.tiff.TIFFDeflater,
TIFFCompressor
abstract public class TIFFCompressor (Code)
An abstract superclass for pluggable TIFF compressors.


Field Summary
protected  intcompressionTagValue
     The value to be assigned to the TIFF Compression tag in the TIFF image metadata.
protected  StringcompressionType
     The name of the compression type supported by this compressor.
protected  booleanisCompressionLossless
     Whether the compression is lossless.
protected  IIOMetadatametadata
     The IIOMetadata object containing metadata for the current image.
protected  ImageOutputStreamstream
     The ImageOutputStream to be written.
protected  ImageWriterwriter
     The ImageWriter calling this TIFFCompressor.

Constructor Summary
public  TIFFCompressor(String compressionType, int compressionTagValue, boolean isCompressionLossless)
     Creates a compressor object for use in compressing TIFF data.

Method Summary
abstract public  intencode(byte[] b, int off, int width, int height, int[] bitsPerSample, int scanlineStride)
     Encodes the supplied image data, writing to the currently set ImageOutputStream.
Parameters:
  b - an array of bytes containing the packedbut uncompressed image data.
Parameters:
  off - the starting offset of the data to be written in thearray b.
Parameters:
  width - the width of the rectangle of pixels to be written.
Parameters:
  height - the height of the rectangle of pixels to be written.
Parameters:
  bitsPerSample - an array of ints indictingthe number of bits used to represent each image sample withina pixel.
Parameters:
  scanlineStride - the number of bytes separating eachrow of the input data.
public  intgetCompressionTagValue()
     Retrieve the value to be assigned to the TIFF Compression tag in the TIFF image metadata.
public  StringgetCompressionType()
     Retrieve the name of the compression type supported by this compressor.
public  IIOMetadatagetMetadata()
     Returns the current IIOMetadata object.
public  ImageOutputStreamgetStream()
     Returns the ImageOutputStream that will be written.
public  ImageWritergetWriter()
     Returns the current ImageWriter.
public  booleanisCompressionLossless()
     Retrieves a value indicating whether the compression is lossless.
public  voidsetMetadata(IIOMetadata metadata)
     Sets the value of the metadata field.
public  voidsetStream(ImageOutputStream stream)
     Sets the ImageOutputStream to be written.
public  voidsetWriter(ImageWriter writer)
     Sets the value of the writer field.

Field Detail
compressionTagValue
protected int compressionTagValue(Code)
The value to be assigned to the TIFF Compression tag in the TIFF image metadata.



compressionType
protected String compressionType(Code)
The name of the compression type supported by this compressor.



isCompressionLossless
protected boolean isCompressionLossless(Code)
Whether the compression is lossless.



metadata
protected IIOMetadata metadata(Code)
The IIOMetadata object containing metadata for the current image.



stream
protected ImageOutputStream stream(Code)
The ImageOutputStream to be written.



writer
protected ImageWriter writer(Code)
The ImageWriter calling this TIFFCompressor.




Constructor Detail
TIFFCompressor
public TIFFCompressor(String compressionType, int compressionTagValue, boolean isCompressionLossless)(Code)
Creates a compressor object for use in compressing TIFF data. This object may be passed to the TIFFImageWriteParam.setTIFFCompressor(TIFFCompressor) method to override the compressor of a supported compression type or to provide the implementation of the compression algorithm of an unsupported compression type.

The parameters compressionTagValue and isCompressionLossless are provided to accomodate compression types which are unknown. A compression type is "known" if it is either among those already supported by the TIFF writer (see TIFFImageWriteParam ), or is listed in the TIFF 6.0 specification but not supported. If the compression type is unknown, the compressionTagValue and isCompressionLossless parameters are ignored.


Parameters:
  compressionType - The name of the compression type.
Parameters:
  compressionTagValue - The value to be assigned to the TIFFCompression tag in the TIFF image metadata; ignored ifcompressionType is a known type.
Parameters:
  isCompressionLossless - Whether the compression is lossless;ignored if compressionType is a known type.
throws:
  IllegalArgumentException - if compressionType isnull or compressionTagValue is less than1.




Method Detail
encode
abstract public int encode(byte[] b, int off, int width, int height, int[] bitsPerSample, int scanlineStride) throws IOException(Code)
Encodes the supplied image data, writing to the currently set ImageOutputStream.
Parameters:
  b - an array of bytes containing the packedbut uncompressed image data.
Parameters:
  off - the starting offset of the data to be written in thearray b.
Parameters:
  width - the width of the rectangle of pixels to be written.
Parameters:
  height - the height of the rectangle of pixels to be written.
Parameters:
  bitsPerSample - an array of ints indictingthe number of bits used to represent each image sample withina pixel.
Parameters:
  scanlineStride - the number of bytes separating eachrow of the input data. the number of bytes written.
throws:
  IOException - if the supplied data cannot be encoded bythis TIFFCompressor, or if any I/O error occursduring writing.



getCompressionTagValue
public int getCompressionTagValue()(Code)
Retrieve the value to be assigned to the TIFF Compression tag in the TIFF image metadata. The Compression tag value.



getCompressionType
public String getCompressionType()(Code)
Retrieve the name of the compression type supported by this compressor. The compression type name.



getMetadata
public IIOMetadata getMetadata()(Code)
Returns the current IIOMetadata object. the IIOMetadata object for the image beingwritten.
See Also:   TIFFCompressor.setMetadata(IIOMetadata)



getStream
public ImageOutputStream getStream()(Code)
Returns the ImageOutputStream that will be written. an ImageOutputStream.
See Also:   TIFFCompressor.setStream(ImageOutputStream)



getWriter
public ImageWriter getWriter()(Code)
Returns the current ImageWriter. an ImageWriter.
See Also:   TIFFCompressor.setWriter(ImageWriter)



isCompressionLossless
public boolean isCompressionLossless()(Code)
Retrieves a value indicating whether the compression is lossless. Whether the compression is lossless.



setMetadata
public void setMetadata(IIOMetadata metadata)(Code)
Sets the value of the metadata field.
Parameters:
  metadata - the IIOMetadata object for theimage being written.
See Also:   TIFFCompressor.getMetadata()



setStream
public void setStream(ImageOutputStream stream)(Code)
Sets the ImageOutputStream to be written.
Parameters:
  stream - an ImageOutputStream to be written.
See Also:   TIFFCompressor.getStream



setWriter
public void setWriter(ImageWriter writer)(Code)
Sets the value of the writer field.
Parameters:
  writer - the current ImageWriter.
See Also:   TIFFCompressor.getWriter()



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(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.