org.w3c.mwi.mobileok.basic
Class HTTPImageResource

java.lang.Object
  extended by org.w3c.mwi.mobileok.basic.HTTPResource
      extended by org.w3c.mwi.mobileok.basic.HTTPImageResource

public class HTTPImageResource
extends HTTPResource

Represents an image resource retrieved via HTTP (or HTTPS).

The class extends HTTPResource to add image format validation and extraction of image properties (width, height, image type).

The class is not intended to be generic. The only supported image formats in mobileOK are GIF and JPEG.

Version:
$Revision: 1.1 $
Author:
The W3C mobileOK Checker Task Force

Constructor Summary
HTTPImageResource(java.net.URI absoluteURI)
           
 
Method Summary
 java.util.List<ValidationByteMessage> getImageErrorMessageList()
           
 int getImageHeight()
           
 java.lang.String getImageType()
           
 int getImageWidth()
           
 java.net.URI getSrcURI()
           
 boolean hasTransparency()
           
 boolean isValid()
           
(package private)  void setImageErrorMessageList(java.util.List<ValidationByteMessage> imageErrorMessageList)
           
(package private)  void setImageHeight(int imageHeight)
           
(package private)  void setImageType(java.lang.String imageType)
           
(package private)  void setImageWidth(int imageWidth)
           
(package private)  void setTransparency(boolean transparency)
           
(package private)  void setValid(boolean valid)
           
 
Methods inherited from class org.w3c.mwi.mobileok.basic.HTTPResource
configureHTTPMethod, executeMethod, getLastRedirect, getRawRequestHeaders, getRawResponseBody, getRawResponseHeaders, getRedirect, getRedirectCount, getRequestHeaders, getResponseHeaders, getResponseProtocol, getResponseReason, getResponseStatus, getStatusCode, getURI, getURI, isValidDateHeader, isValidExpirationDate, massageURI, parseURI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPImageResource

public HTTPImageResource(java.net.URI absoluteURI)
                  throws java.io.IOException,
                         TestException
Throws:
java.io.IOException
TestException
Method Detail

setImageErrorMessageList

final void setImageErrorMessageList(java.util.List<ValidationByteMessage> imageErrorMessageList)

getImageErrorMessageList

public final java.util.List<ValidationByteMessage> getImageErrorMessageList()

isValid

public final boolean isValid()

setValid

final void setValid(boolean valid)

getImageType

public final java.lang.String getImageType()

setImageType

final void setImageType(java.lang.String imageType)

getImageHeight

public final int getImageHeight()

setImageHeight

final void setImageHeight(int imageHeight)

getImageWidth

public final int getImageWidth()

setImageWidth

final void setImageWidth(int imageWidth)

getSrcURI

public final java.net.URI getSrcURI()

hasTransparency

public final boolean hasTransparency()

setTransparency

final void setTransparency(boolean transparency)