Identical to the Base64 encoding defined by RFC1521 and allows a character set to be specified.
RFC1522 describes techniques to allow the encoding of non-ASCII text in various portions of a RFC 822 [2] message header, in a manner which is unlikely to confuse existing message handling software.
- See also
- MIME (Multipurpose Internet Mail Extensions) Part Two: Message Header Extensions for Non-ASCII Text
- Author
- Apache Software Foundation
- Since
- 1.3
- Version
- Id
- BCodec.java,v 1.5 2004/04/13 22:46:37 ggregory Exp
Notice
The following notice applies to the original API on which this API is based, and to its documentation. The documentation of this API has been revised from the original.
/*
* Copyright (C) 2006 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
|
| BCodec () |
| Default constructor.
|
|
| BCodec (final String charset) |
| Constructor which allows for the selection of a default charset. More...
|
|
String | encode (final String value, final String charset) throws EncoderException |
| Encodes a string into its Base64 form using the specified charset. More...
|
|
String | encode (String value) throws EncoderException |
| Encodes a string into its Base64 form using the default charset. More...
|
|
String | decode (String value) throws DecoderException |
| Decodes a Base64 string into its original form. More...
|
|
Object | encode (Object value) throws EncoderException |
| Encodes an object into its Base64 form using the default charset. More...
|
|
Object | decode (Object value) throws DecoderException |
| Decodes a Base64 object into its original form. More...
|
|
String | getDefaultCharset () |
| The default charset used for string decoding and encoding. More...
|
|
|
String | getEncoding () |
| Returns the codec name (referred to as encoding in the RFC 1522) More...
|
|
byte[] | doEncoding (byte[] bytes) throws EncoderException |
| Encodes an array of bytes using the defined encoding scheme. More...
|
|
byte[] | doDecoding (byte[] bytes) throws DecoderException |
| Decodes an array of bytes using the defined encoding scheme. More...
|
|
String | encodeText (final String text, final String charset) throws EncoderException, UnsupportedEncodingException |
| Applies an RFC 1522 compliant encoding scheme to the given string of text with the given charset. More...
|
|
String | decodeText (final String text) throws DecoderException, UnsupportedEncodingException |
| Applies an RFC 1522 compliant decoding scheme to the given string of text. More...
|
|