org.knopflerfish.util
Class Base64
java.lang.Object
org.knopflerfish.util.Base64
public class Base64
- extends java.lang.Object
Method Summary |
static byte[] |
decode(byte[] in)
Decode a string of Base64 data. |
static void |
decode(java.io.InputStream in,
java.io.OutputStream out)
|
static byte[] |
decode(java.lang.String in)
|
static java.lang.String |
encode(byte[] in)
Encode a raw byte array to a Base64 String. |
static java.lang.String |
encode(byte[] in,
int len)
Encode a raw byte array to a Base64 String. |
static void |
encode(java.io.InputStream in,
java.io.OutputStream out,
int len)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Base64
public Base64()
decode
public static byte[] decode(byte[] in)
throws java.io.IOException
- Decode a string of Base64 data.
- Throws:
java.io.IOException
decode
public static byte[] decode(java.lang.String in)
throws java.io.IOException
- Throws:
java.io.IOException
decode
public static void decode(java.io.InputStream in,
java.io.OutputStream out)
throws java.io.IOException
- Throws:
java.io.IOException
encode
public static java.lang.String encode(byte[] in)
throws java.io.IOException
- Encode a raw byte array to a Base64 String.
- Parameters:
in
- Byte array to encode.
- Throws:
java.io.IOException
encode
public static java.lang.String encode(byte[] in,
int len)
throws java.io.IOException
- Encode a raw byte array to a Base64 String.
- Parameters:
in
- Byte array to encode.len
- Length of Base64 lines. 0 means no line breaks.
- Throws:
java.io.IOException
encode
public static void encode(java.io.InputStream in,
java.io.OutputStream out,
int len)
throws java.io.IOException
- Throws:
java.io.IOException