org.w3c.mwi.mobileok.basic
Class HTTPObjectResource
java.lang.Object
org.w3c.mwi.mobileok.basic.HTTPResource
org.w3c.mwi.mobileok.basic.HTTPObjectResource
public class HTTPObjectResource
- extends HTTPResource
Represents an object resource retrieved via HTTP (or HTTPS).
The class extends HTTPResource
to add image format validation,
image type validation against the declared content-type and extraction of
image properties (width, height, image type).
The class is not intended to be generic. An object
element
in mobileOK should only be used to link to an image, whereas it could be
used in theory to link to all sorts of resources.
The class is very similar to the HTTPImageResource
class. It
could extend the HTTPImageResource
in the future.
- Author:
- The W3C mobileOK Checker Task Force
Constructor Summary |
HTTPObjectResource(java.net.URI uri,
java.lang.String markupContentType)
|
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 |
HTTPObjectResource
public HTTPObjectResource(java.net.URI uri,
java.lang.String markupContentType)
throws TestException
- Throws:
TestException
getContentType
public final java.lang.String getContentType()
getLoadType
public final LoadType getLoadType()
setLoadType
public void setLoadType(LoadType loadType)
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 contentType)
getImageHeight
public final int getImageHeight()
setImageHeight
final void setImageHeight(int imageHeight)
getImageWidth
public final int getImageWidth()
setImageWidth
final void setImageWidth(int imageWidth)
hasTransparency
public final boolean hasTransparency()
setTransparency
final void setTransparency(boolean transparency)