public class Base64
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Base64.Base64Encoder |
Modifier and Type | Method and Description |
---|---|
static byte[] |
decode(byte[] data)
decode the base 64 encoded input data.
|
static byte[] |
decode(java.lang.String data)
decode the base 64 encoded String data - whitespace will be ignored.
|
static int |
decode(java.lang.String data,
java.io.OutputStream out)
decode the base 64 encoded String data writing it to the given output stream,
whitespace characters will be ignored.
|
static byte[] |
encode(byte[] data)
encode the input data producing a base 64 encoded byte array.
|
static int |
encode(byte[] data,
int off,
int length,
java.io.OutputStream out)
Encode the byte data to base 64 writing it to the given output stream.
|
static int |
encode(byte[] data,
java.io.OutputStream out)
Encode the byte data to base 64 writing it to the given output stream.
|
public static byte[] encode(byte[] data)
data
- the byte array to encodepublic static int encode(byte[] data, java.io.OutputStream out) throws java.io.IOException
data
- the byte array to encodeout
- the output stream where the result is to be written.java.io.IOException
- if the output stream throws onepublic static int encode(byte[] data, int off, int length, java.io.OutputStream out) throws java.io.IOException
data
- the byte array to encodeoff
- offsetlength
- lengthout
- OutputStreamjava.io.IOException
public static byte[] decode(byte[] data)
data
- the byte array to encodepublic static byte[] decode(java.lang.String data)
data
- the byte array to encodepublic static int decode(java.lang.String data, java.io.OutputStream out) throws java.io.IOException
data
- the data to decodeout
- OutputStreamjava.io.IOException
- if an exception occurs while writing to the specified
output stream
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.