public class Base64FilterInputStream
extends java.io.FilterInputStream
FilterInputStream
that Base64 encodes data read from an
input stream.Constructor and Description |
---|
Base64FilterInputStream(java.io.InputStream in)
Given some
InputStream , create an InputStream that Base64
encodes the input stream. |
Base64FilterInputStream(java.io.InputStream in,
boolean breakLines)
Given some
InputStream , create an InputStream that Base64
encodes the input stream. |
Modifier and Type | Method and Description |
---|---|
int |
available()
Return the number of bytes available to read.
|
boolean |
markSupported()
This implementation does not support
mark() or reset() . |
int |
read()
Reads the next byte of data from the input stream and returns it.
|
int |
read(byte[] b,
int off,
int len)
Reads up to
len bytes of data from the input stream into an array
of bytes. |
long |
skip(long n)
Skip over bytes in the input stream.
|
public Base64FilterInputStream(java.io.InputStream in)
InputStream
, create an InputStream
that Base64
encodes the input stream. No line breaks are included in the output.in
- an InputStream
providing source data for encodingpublic Base64FilterInputStream(java.io.InputStream in, boolean breakLines)
InputStream
, create an InputStream
that Base64
encodes the input stream.in
- an InputStream providing source data for encodingbreakLines
- if true, add line breaks in the outputpublic int read() throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
len
bytes of data from the input stream into an array
of bytes. Returns the actual number of bytes written to the array.read
in class java.io.FilterInputStream
java.io.IOException
public boolean markSupported()
mark()
or reset()
.markSupported
in class java.io.FilterInputStream
false
public int available() throws java.io.IOException
available
in class java.io.FilterInputStream
java.io.IOException
public long skip(long n) throws java.io.IOException
skip
in class java.io.FilterInputStream
n
- number of bytes to skipjava.io.IOException