Java Doc for IIOImage.java in  » 6.0-JDK-Core » image » javax » imageio » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
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
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » image » javax.imageio 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.imageio.IIOImage

IIOImage
public class IIOImage (Code)
A simple container class to aggregate an image, a set of thumbnail (preview) images, and an object representing metadata associated with the image.

The image data may take the form of either a RenderedImage, or a Raster. Reader methods that return an IIOImage will always return a BufferedImage using the RenderedImage reference. Writer methods that accept an IIOImage will always accept a RenderedImage, and may optionally accept a Raster.

Exactly one of getRenderedImage and getRaster will return a non-null value. Subclasses are responsible for ensuring this behavior.
See Also:   ImageReader.readAll(intImageReadParam)
See Also:   ImageReader.readAll(java.util.Iterator)
See Also:   ImageWriter.write(javax.imageio.metadata.IIOMetadataIIOImageImageWriteParam)
See Also:   ImageWriter.write(IIOImage)
See Also:   ImageWriter.writeToSequence(IIOImageImageWriteParam)
See Also:   ImageWriter.writeInsert(intIIOImageImageWriteParam)
version:
   0.5



Field Summary
protected  RenderedImageimage
     The RenderedImage being referenced.
protected  IIOMetadatametadata
     An IIOMetadata object containing metadata associated with the image.
protected  Rasterraster
     The Raster being referenced.
protected  List<? extends BufferedImage>thumbnails
     A List of BufferedImage thumbnails, or null.

Constructor Summary
public  IIOImage(RenderedImage image, List<? extends BufferedImage> thumbnails, IIOMetadata metadata)
     Constructs an IIOImage containing a RenderedImage, and thumbnails and metadata associated with it.
public  IIOImage(Raster raster, List<? extends BufferedImage> thumbnails, IIOMetadata metadata)
     Constructs an IIOImage containing a Raster, and thumbnails and metadata associated with it.

Method Summary
public  IIOMetadatagetMetadata()
     Returns a reference to the current IIOMetadata object, or null is none is set.
public  intgetNumThumbnails()
     Returns the number of thumbnails stored in this IIOImage.
public  RastergetRaster()
     Returns the currently set Raster, or null if only a RenderedImage is available.
public  RenderedImagegetRenderedImage()
     Returns the currently set RenderedImage, or null if only a Raster is available.
public  BufferedImagegetThumbnail(int index)
     Returns a thumbnail associated with the main image.
Parameters:
  index - the index of the desired thumbnail image.
public  List<? extends BufferedImage>getThumbnails()
     Returns the current List of thumbnail BufferedImages, or null if none is set.
public  booleanhasRaster()
     Returns true if this IIOImage stores a Raster rather than a RenderedImage.
public  voidsetMetadata(IIOMetadata metadata)
     Sets the IIOMetadata to a new object, or null.
public  voidsetRaster(Raster raster)
     Sets the current Raster.
public  voidsetRenderedImage(RenderedImage image)
     Sets the current RenderedImage.
public  voidsetThumbnails(List<? extends BufferedImage> thumbnails)
     Sets the list of thumbnails to a new List of BufferedImages, or to null.

Field Detail
image
protected RenderedImage image(Code)
The RenderedImage being referenced.



metadata
protected IIOMetadata metadata(Code)
An IIOMetadata object containing metadata associated with the image.



raster
protected Raster raster(Code)
The Raster being referenced.



thumbnails
protected List<? extends BufferedImage> thumbnails(Code)
A List of BufferedImage thumbnails, or null. Non-BufferedImage objects must not be stored in this List.




Constructor Detail
IIOImage
public IIOImage(RenderedImage image, List<? extends BufferedImage> thumbnails, IIOMetadata metadata)(Code)
Constructs an IIOImage containing a RenderedImage, and thumbnails and metadata associated with it.

All parameters are stored by reference.

The thumbnails argument must either be null or contain only BufferedImage objects.
Parameters:
  image - a RenderedImage.
Parameters:
  thumbnails - a List of BufferedImages,or null.
Parameters:
  metadata - an IIOMetadata object, ornull.
exception:
  IllegalArgumentException - if image isnull.




IIOImage
public IIOImage(Raster raster, List<? extends BufferedImage> thumbnails, IIOMetadata metadata)(Code)
Constructs an IIOImage containing a Raster, and thumbnails and metadata associated with it.

All parameters are stored by reference.
Parameters:
  raster - a Raster.
Parameters:
  thumbnails - a List of BufferedImages,or null.
Parameters:
  metadata - an IIOMetadata object, ornull.
exception:
  IllegalArgumentException - if raster isnull.





Method Detail
getMetadata
public IIOMetadata getMetadata()(Code)
Returns a reference to the current IIOMetadata object, or null is none is set. an IIOMetadata object, or null.
See Also:   IIOImage.setMetadata



getNumThumbnails
public int getNumThumbnails()(Code)
Returns the number of thumbnails stored in this IIOImage. the number of thumbnails, as an int.



getRaster
public Raster getRaster()(Code)
Returns the currently set Raster, or null if only a RenderedImage is available. a Raster, or null.
See Also:   IIOImage.setRaster



getRenderedImage
public RenderedImage getRenderedImage()(Code)
Returns the currently set RenderedImage, or null if only a Raster is available. a RenderedImage, or null.
See Also:   IIOImage.setRenderedImage



getThumbnail
public BufferedImage getThumbnail(int index)(Code)
Returns a thumbnail associated with the main image.
Parameters:
  index - the index of the desired thumbnail image. a thumbnail image, as a BufferedImage.
exception:
  IndexOutOfBoundsException - if the supplied index isnegative or larger than the largest valid index.
exception:
  ClassCastException - if anon-BufferedImage object is encountered in thelist of thumbnails at the given index.
See Also:   IIOImage.getThumbnails
See Also:   IIOImage.setThumbnails



getThumbnails
public List<? extends BufferedImage> getThumbnails()(Code)
Returns the current List of thumbnail BufferedImages, or null if none is set. A live reference is returned. the current List ofBufferedImage thumbnails, or null.
See Also:   IIOImage.getThumbnail(int)
See Also:   IIOImage.setThumbnails



hasRaster
public boolean hasRaster()(Code)
Returns true if this IIOImage stores a Raster rather than a RenderedImage. true if a Raster isavailable.



setMetadata
public void setMetadata(IIOMetadata metadata)(Code)
Sets the IIOMetadata to a new object, or null.
Parameters:
  metadata - an IIOMetadata object, ornull.
See Also:   IIOImage.getMetadata



setRaster
public void setRaster(Raster raster)(Code)
Sets the current Raster. The value is stored by reference. Any existing RenderedImage is discarded.
Parameters:
  raster - a Raster.
exception:
  IllegalArgumentException - if raster isnull.
See Also:   IIOImage.getRaster



setRenderedImage
public void setRenderedImage(RenderedImage image)(Code)
Sets the current RenderedImage. The value is stored by reference. Any existing Raster is discarded.
Parameters:
  image - a RenderedImage.
exception:
  IllegalArgumentException - if image isnull.
See Also:   IIOImage.getRenderedImage



setThumbnails
public void setThumbnails(List<? extends BufferedImage> thumbnails)(Code)
Sets the list of thumbnails to a new List of BufferedImages, or to null. The reference to the previous List is discarded.

The thumbnails argument must either be null or contain only BufferedImage objects.
Parameters:
  thumbnails - a List ofBufferedImage thumbnails, or null.
See Also:   IIOImage.getThumbnail(int)
See Also:   IIOImage.getThumbnails




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.