|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.stc.connector.framework.util.Base64Utils
Implements additional Base64 encoding and decoding methods.
Constructor Summary | |
Base64Utils()
|
Method Summary | |
static byte[] |
base64Decode(byte[] arr)
Decodes a byte array supplied in Base64-encoded format and returns the decoded data as a byte array. |
static java.lang.String |
base64Decode(java.lang.String str)
Decodes a String using MIME Base64 Encryption. |
static byte[] |
base64DecodeToByte(java.lang.String data)
Given a String that is in Base64 encoded format, this method will decode the data and return the decoded data as a byte array. |
static java.lang.String |
byteToBase64String(byte[] data)
Given a byte array, this method will Base64-encode the byte array data and return the encoded data as a String. |
static byte[] |
string2Base64(byte[] arr)
Encodes a String using MIME Base64 Encryption. |
static java.lang.String |
string2Base64(java.lang.String str)
Encodes a String using MIME Base64 Encryption. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Base64Utils()
Method Detail |
public static java.lang.String byteToBase64String(byte[] data) throws java.io.IOException
data
- The byte array data to be encoded.
java.io.IOException
- if there are IO errors.public static byte[] base64DecodeToByte(java.lang.String data) throws java.io.IOException
data
- The Base64-encoded String data to be decoded.
java.io.IOException
- if there are IO errors.public static java.lang.String base64Decode(java.lang.String str) throws java.lang.Exception
str
- Encoded String.
java.lang.Exception
- Thrown if the string cannot be decoded.public static byte[] base64Decode(byte[] arr) throws java.lang.Exception
arr
- The Base64-encoded byte array to be decoded.
java.lang.Exception
- Thrown if the string cannot be decoded.public static java.lang.String string2Base64(java.lang.String str) throws java.lang.Exception
str
- String to be encoded.
java.lang.Exception
- Thrown if the string cannot be encoded.public static byte[] string2Base64(byte[] arr) throws java.lang.Exception
arr
- Byte array to be encoded.
java.lang.Exception
- Thrown if the string cannot be encoded.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |