|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.stackmob.sdk.util.Base64
public class Base64
| Field Summary | |
|---|---|
static byte[] |
ALPHABET
The 64 valid Base64 values. |
static boolean |
DECODE
Specify decoding (value is false). |
static boolean |
ENCODE
Specify encoding (value is true). |
static byte[] |
WEBSAFE_ALPHABET
The 64 valid web safe Base64 values. |
| Method Summary | |
|---|---|
static byte[] |
decode(byte[] source)
Decodes Base64 content in byte array format and returns the decoded byte array. |
static byte[] |
decode(byte[] source,
int off,
int len)
Decodes Base64 content in byte array format and returns the decoded byte array. |
static byte[] |
decode(byte[] source,
int off,
int len,
byte[] decodabet)
Decodes Base64 content using the supplied decodabet and returns the decoded byte array. |
static byte[] |
decode(String s)
Decodes data from Base64 notation. |
static byte[] |
decodeWebSafe(byte[] source)
Decodes web safe Base64 content in byte array format and returns the decoded data. |
static byte[] |
decodeWebSafe(byte[] source,
int off,
int len)
Decodes web safe Base64 content in byte array format and returns the decoded byte array. |
static byte[] |
decodeWebSafe(String s)
Decodes data from web safe Base64 notation. |
static String |
encode(byte[] source)
Encodes a byte array into Base64 notation. |
static String |
encode(byte[] source,
int off,
int len,
byte[] alphabet,
boolean doPadding)
Encodes a byte array into Base64 notation. |
static byte[] |
encode(byte[] source,
int off,
int len,
byte[] alphabet,
int maxLineLength)
Encodes a byte array into Base64 notation. |
static String |
encode(String source)
Encodes a byte array into Base64 notation. |
static String |
encodeWebSafe(byte[] source,
boolean doPadding)
Encodes a byte array into web safe Base64 notation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final boolean ENCODE
true).
public static final boolean DECODE
false).
public static final byte[] ALPHABET
public static final byte[] WEBSAFE_ALPHABET
| Method Detail |
|---|
public static String encode(String source)
encodeBytes(source.getBytes("UTF-8")
source - The string to convert
public static String encode(byte[] source)
encodeBytes(source, 0, source.length)
source - The data to convert
public static String encodeWebSafe(byte[] source,
boolean doPadding)
source - The data to convertdoPadding - is true to pad result with '=' chars if it does
not fall on 3 byte boundaries
public static String encode(byte[] source,
int off,
int len,
byte[] alphabet,
boolean doPadding)
source - The data to convertoff - Offset in array where conversion should beginlen - Length of data to convertalphabet - is the encoding alphabetdoPadding - is true to pad result with '=' chars if it does
not fall on 3 byte boundaries
public static byte[] encode(byte[] source,
int off,
int len,
byte[] alphabet,
int maxLineLength)
source - The data to convertoff - Offset in array where conversion should beginlen - Length of data to convertalphabet - is the encoding alphabetmaxLineLength - maximum length of one line.
public static byte[] decode(String s)
throws Base64DecoderException
s - the string to decode (decoded in default encoding)
Base64DecoderException
public static byte[] decodeWebSafe(String s)
throws Base64DecoderException
s - the string to decode (decoded in default encoding)
Base64DecoderException
public static byte[] decode(byte[] source)
throws Base64DecoderException
source - The Base64 encoded data
Base64DecoderException
public static byte[] decodeWebSafe(byte[] source)
throws Base64DecoderException
source - the string to decode (decoded in default encoding)
Base64DecoderException
public static byte[] decode(byte[] source,
int off,
int len)
throws Base64DecoderException
source - The Base64 encoded dataoff - The offset of where to begin decodinglen - The length of characters to decode
Base64DecoderException
public static byte[] decodeWebSafe(byte[] source,
int off,
int len)
throws Base64DecoderException
source - The Base64 encoded dataoff - The offset of where to begin decodinglen - The length of characters to decode
Base64DecoderException
public static byte[] decode(byte[] source,
int off,
int len,
byte[] decodabet)
throws Base64DecoderException
source - The Base64 encoded dataoff - The offset of where to begin decodinglen - The length of characters to decodedecodabet - the decodabet for decoding Base64 content
Base64DecoderException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||