|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.boylesoftware.cb2.util.CodeUtils
Collection of data encoding/decoding utility functions.
| Constructor Summary | |
CodeUtils()
|
|
| Method Summary | |
static java.lang.String |
bytesToString(byte[] input)
Converts a byte array to a string of printable characters consisting of symbols A-Z, a-z, 0-9, + and *. |
static java.lang.String |
objectToString(java.lang.Object o)
Serializes an object and returns string representation of its data. |
static byte[] |
stringToBytes(java.lang.String input)
Restores a byte array from a string created by bytesToString method. |
static java.lang.Object |
stringToObject(java.lang.String input)
Restores an object instance from the string generated by the objectToString method. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public CodeUtils()
| Method Detail |
public static java.lang.String bytesToString(byte[] input)
stringToBytes method.
input - input bytes.
stringToBytes(java.lang.String)public static byte[] stringToBytes(java.lang.String input)
bytesToString method.
input - the encoded string.
bytesToString(byte[])
public static java.lang.String objectToString(java.lang.Object o)
throws java.io.ObjectStreamException
bytesToString method. The object instance
can be restored with the stringToObject method.
o - the object to serialize.
java.io.ObjectStreamException - if an error happened serializing the
object.stringToObject(java.lang.String)
public static java.lang.Object stringToObject(java.lang.String input)
throws java.io.ObjectStreamException,
java.lang.ClassNotFoundException
objectToString method.
input - the encoded string.
java.io.ObjectStreamException - if an error happened deserializing the
object.
java.lang.ClassNotFoundException - the object's class not found.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||