public class SerializationUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static Object |
fromByteArray(byte[] b) |
static Object |
fromByteArray(byte[] b, boolean compress) |
static Object |
fromString(String s) |
static Object |
fromString(String s, boolean compress)
Transcodes a Base64 encoded string (i.e.
|
static Object |
fromURLEncodedString(String s) |
static Object |
fromURLEncodedString(String s, boolean compress) |
static byte[] |
toByteArray(Serializable s) |
static byte[] |
toByteArray(Serializable s, boolean compress) |
static String |
toString(Serializable o) |
static String |
toString(Serializable o, boolean compress)
Transcodes a serializable object into a Base64 encoded string.
|
static String |
toURLEncodedString(Serializable o) |
static String |
toURLEncodedString(Serializable o, boolean compress) |
public static String toString(Serializable o) throws IOException, javax.mail.MessagingException
IOExceptionjavax.mail.MessagingExceptionpublic static String toURLEncodedString(Serializable o) throws IOException
IOExceptionpublic static String toURLEncodedString(Serializable o, boolean compress) throws IOException
IOExceptionpublic static Object fromURLEncodedString(String s) throws IOException, ClassNotFoundException
IOExceptionClassNotFoundExceptionpublic static Object fromURLEncodedString(String s, boolean compress) throws IOException, ClassNotFoundException
IOExceptionClassNotFoundExceptionpublic static String toString(Serializable o, boolean compress) throws IOException
o - the object to be serializedIOExceptionpublic static Object fromString(String s) throws IOException, ClassNotFoundException
IOExceptionClassNotFoundExceptionpublic static Object fromString(String s, boolean compress) throws IOException, ClassNotFoundException
toString(Serializable)) into an object.s - the encoded StringIOExceptionClassNotFoundExceptionpublic static byte[] toByteArray(Serializable s) throws IOException
IOExceptionpublic static byte[] toByteArray(Serializable s, boolean compress) throws IOException
IOExceptionpublic static Object fromByteArray(byte[] b) throws IOException, ClassNotFoundException
IOExceptionClassNotFoundExceptionpublic static Object fromByteArray(byte[] b, boolean compress) throws IOException, ClassNotFoundException
IOExceptionClassNotFoundException