| java.lang.Object | |
| ↳ | com.google.gdata.util.common.util.Base64 |
Base64 converter class. This code is not a full-blown MIME encoder; it simply converts binary data to base64 data and back.
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| boolean | DECODE | Specify decoding (value is false). |
|||||||||
| boolean | ENCODE | Specify encoding (value is true). |
|||||||||
| byte | EQUALS_SIGN | The equals sign (=) as a byte. | |||||||||
| byte | EQUALS_SIGN_ENC | ||||||||||
| byte | NEW_LINE | The new line character (\n) as a byte. | |||||||||
| byte | WHITE_SPACE_ENC | ||||||||||
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| ALPHABET | The 64 valid Base64 values. | ||||||||||
| DECODABET | Translates a Base64 value to either its 6-bit reconstruction value or a negative number indicating some other meaning. | ||||||||||
| WEBSAFE_ALPHABET | The 64 valid web safe Base64 values. | ||||||||||
| WEBSAFE_DECODABET | The web safe decodabet | ||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Decodes Base64 content in byte array format and returns
the decoded byte array.
| |||||||||||
Decodes Base64 content using the supplied decodabet and returns
the decoded byte array.
| |||||||||||
Decodes data from Base64 notation.
| |||||||||||
Decodes Base64 content in byte array format and returns
the decoded byte array.
| |||||||||||
Decodes web safe Base64 content in byte array format and returns
the decoded byte array.
| |||||||||||
Decodes data from web safe Base64 notation.
| |||||||||||
Decodes web safe Base64 content in byte array format and returns
the decoded data.
| |||||||||||
Encodes a byte array into Base64 notation.
| |||||||||||
Encodes a byte array into Base64 notation.
| |||||||||||
Encodes a byte array into Base64 notation.
| |||||||||||
Encodes a byte array into web safe Base64 notation.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Specify decoding (value is false).
Specify encoding (value is true).
The equals sign (=) as a byte.
The new line character (\n) as a byte.
The 64 valid Base64 values. made private and a method that returns a clone can be added.
Translates a Base64 value to either its 6-bit reconstruction value or a negative number indicating some other meaning.
The 64 valid web safe Base64 values. made private and a method that returns a clone can be added.
The web safe decodabet
Decodes Base64 content in byte array format and returns the decoded byte array.
| source | The Base64 encoded data |
|---|
| Base64DecoderException |
|---|
Decodes Base64 content using the supplied decodabet and returns the decoded byte array.
| source | The Base64 encoded data |
|---|---|
| off | The offset of where to begin decoding |
| len | The length of characters to decode |
| decodabet | The decodabet for decoding Base64 content |
| Base64DecoderException |
|---|
Decodes data from Base64 notation.
| s | The string to decode (decoded in default encoding) |
|---|
| Base64DecoderException |
|---|
Decodes Base64 content in byte array format and returns the decoded byte array.
| source | The Base64 encoded data |
|---|---|
| off | The offset of where to begin decoding |
| len | The length of characters to decode |
| Base64DecoderException |
|---|
Decodes web safe Base64 content in byte array format and returns the decoded byte array. Web safe encoding uses '-' instead of '+', '_' instead of '/'
| source | The Base64 encoded data |
|---|---|
| off | The offset of where to begin decoding |
| len | The length of characters to decode |
| Base64DecoderException |
|---|
Decodes data from web safe Base64 notation. Web safe encoding uses '-' instead of '+', '_' instead of '/'
| s | The string to decode (decoded in default encoding) |
|---|
| Base64DecoderException |
|---|
Decodes web safe Base64 content in byte array format and returns the decoded data. Web safe encoding uses '-' instead of '+', '_' instead of '/'
| source | The string to decode (decoded in default encoding) |
|---|
| Base64DecoderException |
|---|
Encodes a byte array into Base64 notation.
| source | The data to convert |
|---|---|
| off | Offset in array where conversion should begin |
| len | Length of data to convert |
| alphabet | Is the encoding alphabet |
| doPadding | Is true to pad result with '=' chars
if it does not fall on 3 byte boundaries |
Encodes a byte array into Base64 notation.
Equivalent to calling
encodeBytes(source, 0, source.length)
| source | The data to convert |
|---|
Encodes a byte array into Base64 notation.
| source | The data to convert |
|---|---|
| off | Offset in array where conversion should begin |
| len | Length of data to convert |
| alphabet | Is the encoding alphabet |
| maxLineLength | Maximum length of one line. |
Encodes a byte array into web safe Base64 notation.
| source | The data to convert |
|---|---|
| doPadding | Is true to pad result with '=' chars
if it does not fall on 3 byte boundaries
|