public class Base64Coder extends Object
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
decode(char[] in)
Decodes a byte array from Base64 format.
|
static byte[] |
decode(String s)
Decodes a byte array from Base64 format.
|
static String |
decodeString(String s)
Decodes a string from Base64 format.
|
static Object |
deserialize(String s,
boolean gzip)
Read the object from Base64 string.
|
static char[] |
encode(byte[] in)
Encodes a byte array into Base64 format.
|
static char[] |
encode(byte[] in,
int iLen)
Encodes a byte array into Base64 format.
|
static String |
encodeString(String s)
Encodes a string into Base64 format.
|
static String |
serialize(Object o,
boolean gzip)
Write the object to a Base64 string.
|
public static Object deserialize(String s, boolean gzip) throws IOException, ClassNotFoundException
s - the string representation of serialized object.gzip - if gzip streamIOException - if any io pbClassNotFoundException - if class not found ?public static String serialize(Object o, boolean gzip) throws IOException
o - the object to serializegzip - if gzip streamIOException - if any io pbpublic static String encodeString(String s)
s - a String to be encoded.public static char[] encode(byte[] in)
in - an array containing the data bytes to be encoded.public static char[] encode(byte[] in,
int iLen)
in - an array containing the data bytes to be encoded.iLen - number of bytes to process in in.public static String decodeString(String s)
s - a Base64 String to be decoded.IllegalArgumentException - if the input is not valid Base64 encoded data.public static byte[] decode(String s)
s - a Base64 String to be decoded.IllegalArgumentException - if the input is not valid Base64 encoded data.public static byte[] decode(char[] in)
in - a character array containing the Base64 encoded data.IllegalArgumentException - if the input is not valid Base64 encoded data.Copyright © 2008–2018 Ultreia.io. All rights reserved.