Knopflerfish OSGi 5.2.0

org.knopflerfish.util
Class Base64

java.lang.Object
  extended by org.knopflerfish.util.Base64

public class Base64
extends java.lang.Object


Constructor Summary
Base64()
           
 
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
 

Constructor Detail

Base64

public Base64()
Method Detail

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

Knopflerfish OSGi 5.2.0