|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.wiris.plugin.storage.FileStorageAndCache
public class FileStorageAndCache
This class uses the md5 as a digest method and the "cache" folder to store the association of the digest with the formula source (MathML). The images of the formulas are also stored in the "formula" folder. Both the "cache" and "formula" folders are obtained from the WIRIS plugin configuration.
| Constructor Summary | |
|---|---|
FileStorageAndCache()
|
|
| Method Summary | |
|---|---|
java.lang.String |
codeDigest(java.lang.String content)
Given a content, computes a digest of it. |
java.lang.String |
decodeDigest(java.lang.String digest)
Given a computed digest, returns the respective content. |
java.lang.String[] |
getDigestInformation(java.lang.String digest)
|
void |
init(HttpServletRequest request,
java.util.Properties config)
Initializes the storage and cache system. |
byte[] |
retreiveData(java.lang.String digest)
Given a computed digest, returns the stored data associated with it. |
void |
storeData(java.lang.String digest,
byte[] stream)
Associates a data stream with a computed digest. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileStorageAndCache()
| Method Detail |
|---|
public java.lang.String codeDigest(java.lang.String content)
StorageAndCache
codeDigest in interface StorageAndCachepublic java.lang.String decodeDigest(java.lang.String digest)
StorageAndCacheStorageAndCache.codeDigest(java.lang.String).
decodeDigest in interface StorageAndCachedigest - A computed digest.
public java.lang.String[] getDigestInformation(java.lang.String digest)
public void init(HttpServletRequest request,
java.util.Properties config)
StorageAndCache
init in interface StorageAndCacherequest - The servlet request.config - WIRIS plugin configuration loaded from configuration.ini.public byte[] retreiveData(java.lang.String digest)
StorageAndCache
retreiveData in interface StorageAndCachedigest - A computed digest.
public void storeData(java.lang.String digest,
byte[] stream)
StorageAndCache
storeData in interface StorageAndCachedigest - A computed digest.stream - The data to be stored.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||