org.eclipse.internal.xpand2.pr.util
Class BASE64

java.lang.Object
  extended by org.eclipse.internal.xpand2.pr.util.BASE64

public class BASE64
extends Object


Constructor Summary
BASE64()
           
 
Method Summary
static OutputStream createOutputStream(OutputStream out)
          Creates an OutputStream that writes base64 encoded bytes to the given OutputStream.
static OutputStream createOutputStream(OutputStream out, boolean linebreak)
          Creates an OutputStream that writes base64 encoded bytes to the given OutputStream
static byte[] toByteArray(String b64)
           
static String toString(byte[] raw)
           
static String toString(String raw)
           
 
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

createOutputStream

public static OutputStream createOutputStream(OutputStream out)
Creates an OutputStream that writes base64 encoded bytes to the given OutputStream. It writes a line separator every 54 bytes.

Parameters:
out - OutputStream to write to.
Returns:
BASE64 encoding OutputStream

createOutputStream

public static OutputStream createOutputStream(OutputStream out,
                                              boolean linebreak)
Creates an OutputStream that writes base64 encoded bytes to the given OutputStream

Parameters:
out - OutputStream to write to.
linebreak - iff true write a line separator every 54 bytes.
Returns:
BASE64 encoding OutputStream

toString

public static String toString(String raw)
                       throws IOException
Throws:
IOException

toString

public static String toString(byte[] raw)
                       throws IOException
Throws:
IOException

toByteArray

public static byte[] toByteArray(String b64)
                          throws IOException
Throws:
IOException


Copyright © 2015. All rights reserved.