org.ungoverned.oscar.util
Class Util

java.lang.Object
  extended byorg.ungoverned.oscar.util.Util

public class Util
extends java.lang.Object


Constructor Summary
Util()
           
 
Method Summary
static java.lang.String base64Encode(java.lang.String s)
           
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

Util

public Util()
Method Detail

base64Encode

public static java.lang.String base64Encode(java.lang.String s)
                                     throws java.io.IOException
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