|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tapestry.asset.ResourceChecksumSourceImpl
public class ResourceChecksumSourceImpl
Implementation of org.apache.tapestry.asset.ResourceDigestSource
that calculates an
checksum using a message digest and configured encoder.
This code is based on code from Howard Lewis Ship from the upcoming 3.1 release.
Constructor Summary | |
---|---|
ResourceChecksumSourceImpl(String digestAlgorithm,
org.apache.commons.codec.BinaryEncoder encoder)
|
Method Summary | |
---|---|
protected String |
computeChecksum(URL resourceURL)
Computes a message digest of the specified resource and encodes it into a string. |
String |
getChecksum(URL resourceURL)
Checksum is obtained from cache if possible. |
void |
reset()
Clears the internal cache. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResourceChecksumSourceImpl(String digestAlgorithm, org.apache.commons.codec.BinaryEncoder encoder)
Method Detail |
---|
public String getChecksum(URL resourceURL)
computeChecksum(URL)
getChecksum
in interface ResourceChecksumSource
resourceURL
- the url of a resource
org.apache.tapestry.asset.ResourceDigestSource#getChecksum(java.net.URL)
public void reset()
ResourceChecksumSource
reset
in interface ResourceChecksumSource
org.apache.tapestry.asset.ResourceDigestSource#reset()
protected String computeChecksum(URL resourceURL)
resourceURL
- the url of a resource
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |