Class Base64DecodeStream
java.lang.Object
java.io.InputStream
org.apache.batik.util.Base64DecodeStream
- All Implemented Interfaces:
Closeable, AutoCloseable
This class implements a Base64 Character decoder as specified in RFC1113.
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 data[];
InputStream is = new ByteArrayInputStream(data);
is = new Base64DecodeStream(is);
On errors, this class throws a IOException with the following detail
strings:
"Base64DecodeStream: Bad Padding byte (2)." "Base64DecodeStream: Bad Padding byte (1)."
- Version:
- $Id$
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) byte[](package private) boolean(package private) byte[](package private) intprivate static final byte[](package private) InputStream -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class InputStream
mark, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Field Details
-
src
InputStream src -
pem_array
private static final byte[] pem_array -
decode_buffer
byte[] decode_buffer -
out_buffer
byte[] out_buffer -
out_offset
int out_offset -
EOF
boolean EOF
-
-
Constructor Details
-
Base64DecodeStream
-
-
Method Details
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classInputStream
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
available
- Overrides:
availablein classInputStream- Throws:
IOException
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
getNextAtom
- Throws:
IOException
-