echopointng.image
Class URLImageReference

java.lang.Object
  extended by nextapp.echo2.app.StreamImageReference
      extended by echopointng.image.URLImageReference
All Implemented Interfaces:
java.io.Serializable, ImageReference, RenderIdSupport

public class URLImageReference
extends StreamImageReference

URLImageReference provides an ImageReference that gets its image data from an java.net.URL.

See Also:
Serialized Form

Constructor Summary
URLImageReference(java.net.URL imageURL)
          Creates an URLImageReference retrieved from the provided URL.
URLImageReference(java.net.URL imageURL, Extent width, Extent height)
          Creates an URLImageReference retrieved from the provided URL with the specified width and height.
URLImageReference(java.net.URL imageURL, java.lang.String contentType)
          Creates an URLImageReference retrieved from the provided URL and the specified content type.
URLImageReference(java.net.URL imageURL, java.lang.String contentType, Extent width, Extent height)
          Creates an URLImageReference retrieved from the provided URL with the specified content type, width and height.
 
Method Summary
 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.
 java.lang.String getRenderId()
          Returns an identifier that is unique within the ApplicationInstance with which the implementor will be used.
 Extent getWidth()
          Returns the width of the image, or null if the size is unknown.
 void render(java.io.OutputStream out)
          Renders the image data in its native format to the given output stream.
 void update()
          Not supported.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLImageReference

public URLImageReference(java.net.URL imageURL)
Creates an URLImageReference retrieved from the provided URL.

The content type of the image will be determined based on the extension of the URLs external form.


URLImageReference

public URLImageReference(java.net.URL imageURL,
                         java.lang.String contentType)
Creates an URLImageReference retrieved from the provided URL and the specified content type.


URLImageReference

public URLImageReference(java.net.URL imageURL,
                         Extent width,
                         Extent height)
Creates an URLImageReference retrieved from the provided URL with the specified width and height.

The content type of the image will be determined based on the extension of the URLs external form.


URLImageReference

public URLImageReference(java.net.URL imageURL,
                         java.lang.String contentType,
                         Extent width,
                         Extent height)
Creates an URLImageReference retrieved from the provided URL with the specified content type, width and height.

Method Detail

getRenderId

public java.lang.String getRenderId()
Description copied from interface: RenderIdSupport
Returns an identifier that is unique within the ApplicationInstance with which the implementor will be used.

See Also:
RenderIdSupport.getRenderId()

getContentType

public java.lang.String getContentType()
Description copied from class: StreamImageReference
Returns the valid RFC 1521 image content type (e.g., image/png, image/jpeg, image/gif, etc) of the image.

Specified by:
getContentType in class StreamImageReference
Returns:
the content type of the image
See Also:
StreamImageReference.getContentType()

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
Overrides:
getHeight in class StreamImageReference
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
Overrides:
getWidth in class StreamImageReference
Returns:
the width of the image
See Also:
ImageReference.getWidth()

update

public void update()
Not supported.


render

public void render(java.io.OutputStream out)
            throws java.io.IOException
Description copied from class: StreamImageReference
Renders the image data in its native format to the given output stream.

Specified by:
render in class StreamImageReference
Parameters:
out - the output stream to write the image
Throws:
java.io.IOException
See Also:
StreamImageReference.render(java.io.OutputStream)