echopoint.image
Class URLImageReference

java.lang.Object
  extended by nextapp.echo.AbstractImageReference
      extended by nextapp.echo.StreamImageReference
          extended by echopoint.image.URLImageReference
All Implemented Interfaces:
java.io.Serializable, ImageReference

public class URLImageReference
extends StreamImageReference

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

See Also:
Serialized Form

Field Summary
 
Fields inherited from class nextapp.echo.AbstractImageReference
listenerList
 
Fields inherited from interface nextapp.echo.ImageReference
SIZE_UNKNOWN
 
Constructor Summary
URLImageReference(java.net.URL imageURL)
          Creates an URLImageReference retrieved from the provided URL.
URLImageReference(java.net.URL imageURL, int width, int 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, int width, int height)
          Creates an URLImageReference retrieved from the provided URL with the specified content type, width and height.
 
Method Summary
 void addImageUpdateListener(ImageUpdateListener l)
          Not supported.
 java.lang.String getContentType()
          Returns the valid RFC 1521 image content type (image/png, image/jpeg, image/gif, etc) of the image.
 int getHeight()
          Returns the height of the image.
 int getWidth()
          Returns the width of the image.
 void removeImageUpdateListener(ImageUpdateListener l)
          Not supported.
 void render(java.io.OutputStream out)
          Sends a byte representation of the image in its native format out 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,
                         int width,
                         int 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,
                         int width,
                         int height)
Creates an URLImageReference retrieved from the provided URL with the specified content type, width and height.

Method Detail

addImageUpdateListener

public void addImageUpdateListener(ImageUpdateListener l)
Not supported.

Specified by:
addImageUpdateListener in interface ImageReference
Overrides:
addImageUpdateListener in class AbstractImageReference
Parameters:
l - The ImageUpdateListener to add.
See Also:
ImageReference.addImageUpdateListener(ImageUpdateListener)

getContentType

public java.lang.String getContentType()
Description copied from class: StreamImageReference
Returns the valid RFC 1521 image content type (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 int getHeight()
Description copied from interface: ImageReference
Returns the height of the image. If the height is not known, SIZE_UNKNOWN should be returned.

Specified by:
getHeight in interface ImageReference
Overrides:
getHeight in class StreamImageReference
Returns:
The height of the image in pixels.
See Also:
ImageReference.getHeight()

getWidth

public int getWidth()
Description copied from interface: ImageReference
Returns the width of the image. If the width is not known, SIZE_UNKNOWN should be returned.

Specified by:
getWidth in interface ImageReference
Overrides:
getWidth in class StreamImageReference
Returns:
The width of the image in pixels.
See Also:
ImageReference.getWidth()

removeImageUpdateListener

public void removeImageUpdateListener(ImageUpdateListener l)
Not supported.

Specified by:
removeImageUpdateListener in interface ImageReference
Overrides:
removeImageUpdateListener in class AbstractImageReference
Parameters:
l - The ImageUpdateListener to remove.
See Also:
ImageReference.removeImageUpdateListener(ImageUpdateListener)

update

public void update()
Not supported.

Specified by:
update in interface ImageReference
Overrides:
update in class AbstractImageReference
See Also:
ImageReference.update()

render

public void render(java.io.OutputStream out)
            throws java.io.IOException
Description copied from class: StreamImageReference
Sends a byte representation of the image in its native format out 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(OutputStream)