|
NextApp Echo2 v2.1.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nextapp.echo2.app.StreamImageReference nextapp.echo2.app.ResourceImageReference
public class ResourceImageReference
A representation of an image that will be retrieved as a resource from the CLASSPATH.
Constructor Summary | |
---|---|
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 . |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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 imageMethod Detail |
---|
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public java.lang.String getContentType()
StreamImageReference
getContentType
in class StreamImageReference
StreamImageReference.getContentType()
public Extent getHeight()
ImageReference
getHeight
in interface ImageReference
getHeight
in class StreamImageReference
ImageReference.getHeight()
public java.lang.String getRenderId()
RenderIdSupport
ApplicationInstance
with which the implementor will be
used.
RenderIdSupport.getRenderId()
public java.lang.String getResource()
public Extent getWidth()
ImageReference
getWidth
in interface ImageReference
getWidth
in class StreamImageReference
ImageReference.getWidth()
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public void render(java.io.OutputStream out) throws java.io.IOException
StreamImageReference
render
in class StreamImageReference
out
- the output stream to write the image
java.io.IOException
StreamImageReference.render(java.io.OutputStream)
|
NextApp Echo2 v2.1.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |