|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.w3c.tools.resources.AttributeHolder
org.w3c.tools.resources.Resource
org.w3c.tools.resources.FramedResource
org.w3c.tools.resources.ResourceFrame
org.w3c.tools.resources.ProtocolFrame
org.w3c.jigsaw.frames.HTTPFrame
org.w3c.jigsaw.frames.JpegComFrame
public class JpegComFrame
This class will read the comments from a jpeg file and return it depending on the Accept: header
| Field Summary | |
|---|---|
protected static int |
ATTR_COM_TYPE
Attribute index - The comment content type |
protected HttpEntityTag |
cometag
The comment entity tag |
protected java.lang.String |
comment
The comment. |
static boolean |
debug
|
protected static java.lang.String[] |
vary
the static String of the Vary ehader to be added |
| Fields inherited from class org.w3c.jigsaw.frames.HTTPFrame |
|---|
acceptRanges, allowed, ATTR_ALLOW_DEL, ATTR_BROWSABLE, ATTR_CHARSET, ATTR_CONTENT_ENCODING, ATTR_CONTENT_LANGUAGE, ATTR_CONTENT_LENGTH, ATTR_CONTENT_TYPE, ATTR_ICON, ATTR_ICONDIR, ATTR_INDEX, ATTR_INDEXES, ATTR_MAXAGE, ATTR_MD5, ATTR_PUTABLE, ATTR_QUALITY, ATTR_RELOCATE, ATTR_STYLE_LINK, ATTR_TITLE, browsetype, COND_FAILED, COND_OK, COND_WEAK, dresource, fresource, listing, listing_stamp, STATE_CONTENT_LOCATION |
| Fields inherited from class org.w3c.tools.resources.ResourceFrame |
|---|
filterClass, frameListener, resource |
| Fields inherited from class org.w3c.tools.resources.FramedResource |
|---|
ATTR_OID, attrListener, debugEvent, event_disabled, framesRef, structListener |
| Fields inherited from class org.w3c.tools.resources.Resource |
|---|
ATTR_CONTEXT, ATTR_HELP_URL, ATTR_IDENTIFIER, ATTR_LAST_MODIFIED, ATTR_PARENT, ATTR_RESOURCE_FRAMES, ATTR_STORE_ENTRY, ATTR_URL, co, id |
| Fields inherited from class org.w3c.tools.resources.AttributeHolder |
|---|
attributes, values |
| Constructor Summary | |
|---|---|
JpegComFrame()
|
|
| Method Summary | |
|---|---|
void |
attributeChanged(AttributeChangedEvent evt)
Listen its resource. |
int |
checkIfMatch(Request request,
HttpEntityTag etag)
Check the If-Match condition of that request. |
int |
checkIfNoneMatch(Request request,
HttpEntityTag etag)
Check the If-None-Match condition of that request. |
int |
checkValidators(Request request,
HttpEntityTag etag)
check the validators namely LMT/Etags according to rfc2616 rules |
Reply |
createCommentReply(Request request)
|
Reply |
createCommentReply(Request request,
int status)
|
HttpEntityTag |
getComETag()
Get the comment Etag |
MimeType |
getCommentType()
get the content type of the comment embedded in the picture |
protected Reply |
getFileResource(Request request)
Get for FileResource |
protected HttpAccept |
getMatchingAccept(HttpAccept[] accepts,
MimeType mime)
|
protected java.lang.String |
getMetadata()
Extract the comment from the jpeg image. |
protected Reply |
headFileResource(Request request)
Perform a HEAD request for the associated FileResource. |
protected boolean |
negotiate(Request request)
Negotiate. |
protected Reply |
putFileResource(Request request)
Allow PUT based only on ETags, otherwise PUT is done on the image itself |
protected void |
updateCachedHeaders()
Update the cached headers value. |
| Methods inherited from class org.w3c.tools.resources.ResourceFrame |
|---|
addFrameEventListener, eventDisabled, fireFrameEvent, frameModified, getFilters, getFilters, getFrameReference, getResource, getResourceReference, getSpaceEntry, getURLPath, lookupFilters, lookupFrames, postFrameEvent, processEvent, removeFrameEventListener, unregisterResource, updateDefaultChildAttributes |
| Methods inherited from class org.w3c.tools.resources.Resource |
|---|
acceptUnload, checkMultipleLock, collectFrames, getContext, getFrame, getFrames, getIdentifier, getLastModified, getParent, getServer, getSpace, getStoreEntry, getValue, getValue, isInitialized, isUnloaded, setContext, setContext, setValue, unsafeGetContext, unsafeGetFrame, unsafeGetFrames, unsafeGetIdentifier, unsafeGetResourceReference, unsafeGetURLPath, unsafeGetValue, updateAttributes |
| Methods inherited from class org.w3c.tools.resources.AttributeHolder |
|---|
definesAttribute, definesAttribute, getAttributes, getBoolean, getChar, getClone, getClone, getDouble, getFloat, getInt, getLong, getString, getValue, lookupAttribute, print, setBoolean, setChar, setDouble, setFloat, setInt, setLong, setString, setValue, unsafeDefinesAttribute, unsafeGetDouble, unsafeGetString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final boolean debug
protected static int ATTR_COM_TYPE
protected static java.lang.String[] vary
protected HttpEntityTag cometag
protected java.lang.String comment
| Constructor Detail |
|---|
public JpegComFrame()
| Method Detail |
|---|
public MimeType getCommentType()
protected java.lang.String getMetadata()
public HttpEntityTag getComETag()
protected void updateCachedHeaders()
updateCachedHeaders in class HTTPFramepublic void attributeChanged(AttributeChangedEvent evt)
attributeChanged in interface AttributeChangedListenerattributeChanged in class HTTPFrameevt - The AttributeChangeEvent describing the change.
public Reply createCommentReply(Request request,
int status)
public Reply createCommentReply(Request request)
public int checkIfMatch(Request request,
HttpEntityTag etag)
If-Match condition of that request.
request - The request to check.
COND_FAILED if condition
was checked, but failed, COND_OK if condition was checked
and succeeded, or 0 if the condition was not checked
at all (eg because the resource or the request didn't support it).
public int checkIfNoneMatch(Request request,
HttpEntityTag etag)
If-None-Match condition of that request.
request - The request to check.
COND_FAILED if condition
was checked, but failed, COND_OK if condition was checked
and succeeded, or 0 if the condition was not checked
at all (eg because the resource or the request didn't support it).
public int checkValidators(Request request,
HttpEntityTag etag)
COND_FAILED if condition
was checked, but failed, COND_OK if condition was checked
and succeeded, or 0 if the condition was not checked
at all (eg because the resource or the request didn't support it).
protected boolean negotiate(Request request)
throws ProtocolException
request - the incomming request.
ProtocolException
protected HttpAccept getMatchingAccept(HttpAccept[] accepts,
MimeType mime)
protected Reply headFileResource(Request request)
throws ProtocolException,
ResourceException
headFileResource in class HTTPFramerequest - the incomming request.
ProtocolException - If processsing the request failed.
ResourceException - If the resource got a fatal error.
protected Reply getFileResource(Request request)
throws ProtocolException,
ResourceException
getFileResource in class HTTPFramerequest - the incomming request.
ProtocolException - If processsing the request failed.
ResourceException - If the resource got a fatal error.
protected Reply putFileResource(Request request)
throws ProtocolException,
ResourceException
putFileResource in class HTTPFramerequest - The incomming request.
ProtocolException - if a protocol
error occurs
ResourceException - If the resource got a fatal error.HTTPFrame.putFileResource
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||