public class ResourceImageReference extends StreamImageReference
| Constructor and Description |
|---|
ResourceImageReference(java.lang.String resource)
Creates a
ResourceImageReference. |
ResourceImageReference(java.lang.String resource,
Extent width,
Extent height)
Creates a
ResourceImageReference. |
ResourceImageReference(java.lang.String resource,
java.lang.String contentType)
Creates a
ResourceImageReference. |
ResourceImageReference(java.lang.String resource,
java.lang.String contentType,
Extent width,
Extent height)
Creates a
ResourceImageReference. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
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. |
java.lang.String |
getResource()
Returns the name of the resource.
|
Extent |
getWidth()
Returns the width of the image, or null if the size is unknown.
|
int |
hashCode() |
void |
render(java.io.OutputStream out)
Renders the image data in its native format to the given output stream.
|
public ResourceImageReference(java.lang.String resource)
ResourceImageReference.
The content type will be automatically determined.resource - the resource name containing the binary image datapublic ResourceImageReference(java.lang.String resource,
java.lang.String contentType)
ResourceImageReference.resource - the resource name containing the binary image data
(all resource names will be treated as absolute, it is
unnecessary to prepend a leading slash to the resource name)contentType - the content type of the image (or null to
automatically determine the content type based on the resource
extension)public ResourceImageReference(java.lang.String resource,
Extent width,
Extent height)
ResourceImageReference.
The content type will be automatically determined.resource - the resource name containing the binary image data
(all resource names will be treated as absolute, it is
unnecessary to prepend a leading slash to the resource name)width - the width of the imageheight - the height of the imagepublic ResourceImageReference(java.lang.String resource,
java.lang.String contentType,
Extent width,
Extent height)
ResourceImageReference.resource - the resource name containing the binary image data
(all resource names will be treated as absolute, it is
unnecessary to prepend a leading slash to the resource name)contentType - the content type of the image (or null to
automatically determine the content type based on the resource
extension)width - the width of the imageheight - the height of the imagepublic boolean equals(java.lang.Object o)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public java.lang.String getContentType()
StreamImageReferencegetContentType in class StreamImageReferenceStreamImageReference.getContentType()public Extent getHeight()
ImageReferencegetHeight in interface ImageReferencegetHeight in class StreamImageReferenceImageReference.getHeight()public java.lang.String getRenderId()
RenderIdSupportApplicationInstance with which the implementor will be
used.RenderIdSupport.getRenderId()public java.lang.String getResource()
public Extent getWidth()
ImageReferencegetWidth in interface ImageReferencegetWidth in class StreamImageReferenceImageReference.getWidth()public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public void render(java.io.OutputStream out)
throws java.io.IOException
StreamImageReferencerender in class StreamImageReferenceout - the output stream to write the imagejava.io.IOExceptionStreamImageReference.render(java.io.OutputStream)