| java.lang.Object sun.misc.CharacterDecoder sun.misc.BASE64Decoder
BASE64Decoder | public class BASE64Decoder extends CharacterDecoder (Code) | | This class implements a BASE64 Character decoder as specified in RFC1521.
This RFC is part of the MIME specification which is published by the
Internet Engineering Task Force (IETF). Unlike some other encoding
schemes there is nothing in this encoding that tells the decoder
where a buffer starts or stops, so to use it you will need to isolate
your encoded data into a single chunk and then feed them this decoder.
The simplest way to do that is to read all of the encoded data into a
string and then use:
byte mydata[];
BASE64Decoder base64 = new BASE64Decoder();
mydata = base64.decodeBuffer(bufferString);
This will decode the String in bufferString and give you an array
of bytes in the array myData.
On errors, this class throws a CEFormatException with the following detail
strings:
"BASE64Decoder: Not enough bytes for an atom."
version: 1.19, 02/02/00 author: Chuck McManis See Also: CharacterEncoder See Also: BASE64Decoder |
decode_buffer | byte decode_buffer(Code) | | |
bytesPerAtom | protected int bytesPerAtom()(Code) | | This class has 4 bytes per atom
|
bytesPerLine | protected int bytesPerLine()(Code) | | Any multiple of 4 will do, 72 might be common
|
Methods inherited from sun.misc.CharacterDecoder | abstract protected int bytesPerAtom()(Code)(Java Doc) abstract protected int bytesPerLine()(Code)(Java Doc) protected void decodeAtom(InputStream aStream, OutputStream bStream, int l) throws IOException(Code)(Java Doc) public void decodeBuffer(InputStream aStream, OutputStream bStream) throws IOException(Code)(Java Doc) public byte decodeBuffer(String inputString) throws IOException(Code)(Java Doc) public byte decodeBuffer(InputStream in) throws IOException(Code)(Java Doc) protected void decodeBufferPrefix(InputStream aStream, OutputStream bStream) throws IOException(Code)(Java Doc) protected void decodeBufferSuffix(InputStream aStream, OutputStream bStream) throws IOException(Code)(Java Doc) protected int decodeLinePrefix(InputStream aStream, OutputStream bStream) throws IOException(Code)(Java Doc) protected void decodeLineSuffix(InputStream aStream, OutputStream bStream) throws IOException(Code)(Java Doc) protected int readFully(InputStream in, byte buffer, int offset, int len) throws java.io.IOException(Code)(Java Doc)
|
|
|