org.webmacro.util
Class EncodingCache
java.lang.Object
org.webmacro.util.EncodingCache
- public final class EncodingCache
- extends java.lang.Object
Constructor Summary |
EncodingCache(java.lang.String encoding)
|
EncodingCache(java.lang.String encoding,
int buckets)
Create a new EncodingCache with space for buckets * length
encoded strings. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EncodingCache
public EncodingCache(java.lang.String encoding)
throws java.io.UnsupportedEncodingException
EncodingCache
public EncodingCache(java.lang.String encoding,
int buckets)
throws java.io.UnsupportedEncodingException
- Create a new EncodingCache with space for buckets * length
encoded strings. Buckets is the number of hashtable buckets
the cache will be based on, length is the number of objects
that can be held in each bucket.
getEncodingName
public java.lang.String getEncodingName()
encode
public byte[] encode(java.lang.String s)
encode
public byte[][] encode(java.lang.String[] s)
encode
public byte[][] encode(java.lang.String[] s,
int hash)
getInstance
public static EncodingCache getInstance(java.lang.String encoding)
throws java.io.UnsupportedEncodingException
- Throws:
java.io.UnsupportedEncodingException
main
public static void main(java.lang.String[] arg)