NextApp Echo3
v3.0.b4

nextapp.echo.app
Class StreamImageReference

java.lang.Object
  extended by nextapp.echo.app.StreamImageReference
All Implemented Interfaces:
java.io.Serializable, ImageReference, RenderIdSupport
Direct Known Subclasses:
ResourceImageReference

public abstract class StreamImageReference
extends java.lang.Object
implements ImageReference

Base class for ImageReferences whose content is delivered by an OutputStream. Some internal ImageReference types are based on this class, and it may also be used for images streamed by an application.

See Also:
Serialized Form

Constructor Summary
StreamImageReference()
          Default constructor.
 
Method Summary
abstract  java.lang.String getContentType()
          Returns the valid RFC 1521 image content type (e.g., image/png, image/jpeg, image/gif, etc) of the image.
 Extent getHeight()
          Returns the height of the image, or null if the size is unknown.
 Extent getWidth()
          Returns the width of the image, or null if the size is unknown.
abstract  void render(java.io.OutputStream out)
          Renders the image data in its native format to the given output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface nextapp.echo.app.RenderIdSupport
getRenderId
 

Constructor Detail

StreamImageReference

public StreamImageReference()
Default constructor.

Method Detail

getContentType

public abstract java.lang.String getContentType()
Returns the valid RFC 1521 image content type (e.g., image/png, image/jpeg, image/gif, etc) of the image.

Returns:
the content type of the image

getHeight

public Extent getHeight()
Description copied from interface: ImageReference
Returns the height of the image, or null if the size is unknown.

Specified by:
getHeight in interface ImageReference
Returns:
the height of the image
See Also:
ImageReference.getHeight()

getWidth

public Extent getWidth()
Description copied from interface: ImageReference
Returns the width of the image, or null if the size is unknown.

Specified by:
getWidth in interface ImageReference
Returns:
the width of the image
See Also:
ImageReference.getWidth()

render

public abstract void render(java.io.OutputStream out)
                     throws java.io.IOException
Renders the image data in its native format to the given output stream.

Parameters:
out - the output stream to write the image
Throws:
java.io.IOException

NextApp Echo3
v3.0.b4