|
||||||||||
| 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(java.lang.String algorithm)
create an instance of the message digest resource version provider using the specified algorithm. |
|
MessageDigestResourceVersion(java.lang.String algorithm,
Bytes bufferSize)
create an instance of the message digest resource version provider using the specified algorithm. |
|
| Method Summary | |
|---|---|
protected byte[] |
computeDigest(java.io.InputStream inputStream)
compute digest for resource stream |
protected java.security.MessageDigest |
getMessageDigest()
get instance of message digest provider from JCA |
java.lang.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(java.lang.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(java.lang.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 java.lang.String getVersion(IStaticCacheableResource resource)
IResourceVersion
getVersion in interface IResourceVersionresource - cacheable resource
null
if version string could not be calculatedprotected java.security.MessageDigest getMessageDigest()
protected byte[] computeDigest(java.io.InputStream inputStream)
throws java.io.IOException
inputStream - input stream to compute message digest for
ResourceStreamNotFoundException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||