|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.w3c.mwi.mobileok.basic.DecodedContent
org.w3c.mwi.mobileok.basic.ImageContent
org.w3c.mwi.mobileok.basic.JpegImageContent
public class JpegImageContent
Represents a image/jpeg image resource.
| Field Summary | |
|---|---|
private java.util.List<ValidationByteMessage> |
imageErrorMessageList
List of image format validation errors. |
private int |
imageHeight
Height of the image in pixels. |
private int |
imageWidth
Width of the image in pixels. |
private boolean |
transparency
True when the image uses transparency (GIF images only). |
private boolean |
valid
True when the format of the image could be validated successfully. |
| Constructor Summary | |
|---|---|
JpegImageContent(java.net.URI uri,
java.util.List<RetrievalElement> retrieved)
Creates a class instance bound to a URI. |
|
| Method Summary | |
|---|---|
java.util.List<ValidationByteMessage> |
getImageErrorMessageList()
Returns the list of image format validation error messages. |
int |
getImageHeight()
Returns the height of the image. |
java.lang.String |
getImageType()
Returns the image content-type. |
int |
getImageWidth()
Returns the width of the image. |
boolean |
hasTransparency()
Returns true when the image uses transparency. |
boolean |
isValid()
Returns true when the content could be successfully
decoded. |
| Methods inherited from class org.w3c.mwi.mobileok.basic.ImageContent |
|---|
toMokiNode |
| Methods inherited from class org.w3c.mwi.mobileok.basic.DecodedContent |
|---|
addByteErrorMessages, addLineAndColumnMessages |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private boolean valid
True when the format of the image could be validated successfully.
private int imageWidth
private int imageHeight
private boolean transparency
True when the image uses transparency (GIF images only).
private java.util.List<ValidationByteMessage> imageErrorMessageList
| Constructor Detail |
|---|
public JpegImageContent(java.net.URI uri,
java.util.List<RetrievalElement> retrieved)
throws TestException
The content is validated while it is instantiated.
uri - absolute URI of the resource.retrieved - the retrieved representation of the resource.
TestException - an unexpected error occurred while retrieving the resource.| Method Detail |
|---|
public int getImageHeight()
ImageContent
getImageHeight in class ImageContentpublic int getImageWidth()
ImageContent
getImageWidth in class ImageContentpublic boolean hasTransparency()
ImageContenttrue when the image uses transparency.
Support for transparency may depend on the image format.
A false may thus also mean that transparency simply cannot
be used.
hasTransparency in class ImageContenttrue when the image uses transparency,
false otherwise.public boolean isValid()
DecodedContenttrue when the content could be successfully
decoded.
isValid in class DecodedContenttrue when the content is valid,
false otherwise.public java.util.List<ValidationByteMessage> getImageErrorMessageList()
ImageContent
getImageErrorMessageList in class ImageContentpublic java.lang.String getImageType()
ImageContent
getImageType in class ImageContent
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||