org.apache.shindig.common.util
Class StringEncoding

java.lang.Object
  extended by org.apache.shindig.common.util.StringEncoding

public class StringEncoding
extends Object

Utility class for encoding strings to and from byte arrays.


Constructor Summary
StringEncoding(char[] userDigits)
          Creates a new encoding based on the supplied set of digits.
 
Method Summary
 byte[] decode(String encoded)
          Decodes the given encoded string and returns the original raw bytes.
 String encode(byte[] data)
          Returns the given bytes in their encoded form.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringEncoding

public StringEncoding(char[] userDigits)
Creates a new encoding based on the supplied set of digits.

Method Detail

encode

public String encode(byte[] data)
Returns the given bytes in their encoded form.


decode

public byte[] decode(String encoded)
Decodes the given encoded string and returns the original raw bytes.



Copyright © 2007-2012. All Rights Reserved.