|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ikrs.httpd.ETag
public class ETag
The ETag (entity tag) is sort of a resource hash. It is built of the resource's name, the resource's size (if available) and the resource's date of last modification; if the modification date is unknown the current time stamp is used, so each time it is called a new hash is generated (the resource might have changed in between). For details see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
Method Summary | |
---|---|
static ETag |
create(Resource resource,
java.net.URI relativeURI)
Create a new ETag from the given credentials. |
java.lang.String |
createHeaderValue()
This method creates a fully qualified ETag HTTP header value. |
java.lang.String |
createHexHash()
This method creates the hexadecimal representation of the hashed resource information. |
byte[] |
createRawHash()
This method creates the raw hash bytes from the passed resource information. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public byte[] createRawHash() throws java.io.IOException, java.security.NoSuchAlgorithmException
java.io.IOException
java.security.NoSuchAlgorithmException
public java.lang.String createHexHash() throws java.io.IOException, java.security.NoSuchAlgorithmException
java.io.IOException
java.security.NoSuchAlgorithmException
public java.lang.String createHeaderValue() throws java.io.IOException, java.security.NoSuchAlgorithmException
java.io.IOException
java.security.NoSuchAlgorithmException
public static ETag create(Resource resource, java.net.URI relativeURI) throws java.lang.NullPointerException
resource
- The resource to use (must not be null).relativeURI
- The resource's request URI (relative; may be null).
java.lang.NullPointerException
- If the passed resource is null.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |