public class Base64InputStream extends InputStream
Base64InputStream
is used to read base64 text in
the form of a string through a conventional input stream. This is
provided for convenience so that it is possible to encode and
decode binary data as base64 for implementations that would
normally use a binary format.Base64Encoder
Constructor and Description |
---|
Base64InputStream(String source)
Constructor for the
Base64InputStream object. |
Modifier and Type | Method and Description |
---|---|
int |
read()
This is used to read the next byte decoded from the text.
|
int |
read(byte[] array,
int offset,
int length)
This is used to read the next byte decoded from the text.
|
String |
toString()
This returns the original base64 text that was encoded.
|
available, close, mark, markSupported, read, reset, skip
public Base64InputStream(String source)
Base64InputStream
object.
This takes an encoded string and reads it as binary data.source
- this string containing the encoded datapublic int read() throws IOException
read
in class InputStream
IOException
public int read(byte[] array, int offset, int length) throws IOException
read
in class InputStream
array
- this is the array to decode the text tooffset
- this is the offset to decode in to the arraythis
- is the number of bytes available to decode toIOException
Copyright © 2019. All rights reserved.