|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.request.resource.caching.version.MessageDigestResourceVersion
public class MessageDigestResourceVersion
computes the message digest of a IStaticCacheableResource
and uses it as a version string
| Constructor Summary | |
|---|---|
MessageDigestResourceVersion()
create an instance of the message digest resource version provider using algorithm |
|
MessageDigestResourceVersion(String algorithm)
create an instance of the message digest resource version provider using the specified algorithm. |
|
MessageDigestResourceVersion(String algorithm,
Bytes bufferSize)
create an instance of the message digest resource version provider using the specified algorithm. |
|
| Method Summary | |
|---|---|
protected byte[] |
computeDigest(InputStream inputStream)
compute digest for resource stream |
protected MessageDigest |
getMessageDigest()
get instance of message digest provider from JCA |
String |
getVersion(IStaticCacheableResource resource)
get unique string identifying the version of the resource |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MessageDigestResourceVersion()
MessageDigestResourceVersion(String),
MessageDigestResourceVersion(String, org.apache.wicket.util.lang.Bytes)public MessageDigestResourceVersion(String algorithm)
MessageDigest.getInstance(String). For digest computation
an internal buffer of up to
bytes will be used.
algorithm - digest algorithmMessageDigestResourceVersion(),
MessageDigestResourceVersion(String, org.apache.wicket.util.lang.Bytes)
public MessageDigestResourceVersion(String algorithm,
Bytes bufferSize)
MessageDigest.getInstance(String). For digest computation
an internal buffer with a maximum size specified by parameter
bufferSize will be used.
algorithm - digest algorithmbufferSize - maximum size for internal buffer| Method Detail |
|---|
public String getVersion(IStaticCacheableResource resource)
IResourceVersion
getVersion in interface IResourceVersionresource - cacheable resource
null
if version string could not be calculatedprotected MessageDigest getMessageDigest()
protected byte[] computeDigest(InputStream inputStream)
throws IOException
inputStream - input stream to compute message digest for
ResourceStreamNotFoundException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||