java.lang.Object
java.io.InputStream
io.sf.carte.echosvg.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)."
-
Constructor Summary
-
Method Summary
Methods inherited from class java.io.InputStream
mark, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Constructor Details
-
Base64DecodeStream
-
-
Method Details
-
markSupported
public boolean markSupported()- Overrides:
markSupported
in classInputStream
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-
available
- Overrides:
available
in classInputStream
- Throws:
IOException
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-