public class Base64
extends java.lang.Object
Constructor and Description |
---|
Base64() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
decode(java.io.InputStream in)
Decode Base64 input characters into a String representation of decoded binary stream.
|
void |
decode(java.io.InputStream in,
java.io.OutputStream out)
Decode Base64 input character stream into binary output stream.
|
byte[] |
decode(java.lang.String b64)
Decode Base64 encoded String into byte array.
|
java.lang.String |
encode(byte[] data,
boolean newLines)
Encode byte array into Base64 String.
|
void |
encode(java.io.InputStream in,
java.io.OutputStream out)
Encode binary input stream into Base64 character stream.
|
void |
encode(java.io.InputStream in,
java.io.OutputStream out,
boolean newLines)
Encode binary input stream into Base64 character stream.
|
public void encode(java.io.InputStream in, java.io.OutputStream out) throws java.io.IOException
in
- the InputStream
to encode.out
- the OutputStream
to which the encoded data is written.java.io.IOException
- if an I/O error occurs while encoding.public void encode(java.io.InputStream in, java.io.OutputStream out, boolean newLines) throws java.io.IOException
in
- the InputStream
to encode.out
- the OutputStream
to which the encoded data is written.newLines
- if true
the encoded data is written in max 76 character lines.java.io.IOException
- if an I/O error occurs while encoding.public java.lang.String encode(byte[] data, boolean newLines)
data
- the byte array to encodenewLines
- if true
the encoded data is written in max 76 character lines.public void decode(java.io.InputStream in, java.io.OutputStream out) throws java.io.IOException
in
- the InputStream
to decode.out
- the OutputStream
to write the decoded data to.java.io.IOException
- if an I/O error occurs while decoding.public java.lang.String decode(java.io.InputStream in) throws java.io.IOException
in
- the InputStream
to decode.java.io.IOException
public byte[] decode(java.lang.String b64) throws java.io.IOException
b64
- the string to decodejava.io.IOException