public class Base64Util
extends java.lang.Object
Implements encode and decode according to JavaMail/Mime base64 encoding conventions.
Logic based on the classes
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT |
static java.lang.String |
VERSION |
Constructor and Description |
---|
Base64Util() |
Modifier and Type | Method and Description |
---|---|
static java.io.OutputStream |
createEncodingOutputStream(java.io.OutputStream os) |
static java.io.OutputStream |
createEncodingOutputStream(java.io.OutputStream os,
boolean aIncludeLineBreaks) |
static byte[] |
decode(byte[] aInByteArray) |
static java.io.InputStream |
decode(java.io.InputStream is) |
static java.lang.String |
decode(java.lang.String s) |
static java.lang.String |
decode(java.lang.String s,
byte[] aBuffer) |
static byte[] |
decodeToByteArray(java.lang.String s) |
static byte[] |
encode(byte[] aInByteArray) |
static java.io.OutputStream |
encode(java.io.OutputStream os)
Deprecated.
This form has a flaw where calls to flush() generate the stream termination sequence, instead of at close. Use createEncodingOutputStream(java.io.OutputStream) instead.
|
static java.io.OutputStream |
encode(java.io.OutputStream os,
boolean aIncludeLineBreaks)
Deprecated.
This form has a flaw where calls to flush() generate the stream termination sequence, instead of at close. Use createEncodingOutputStream(java.io.OutputStream) instead.
|
static java.lang.String |
encode(java.lang.String s) |
static java.lang.String |
encode(java.lang.String s,
boolean aIncludeLineBreaks) |
static byte[] |
encodeToByteArray(java.lang.String s) |
static java.lang.String |
encodeToString(byte[] aInByteArray) |
static java.lang.String |
encodeToString(byte[] aInByteArray,
boolean aIncludeLineBreaks) |
public static final java.lang.String COPYRIGHT
public static final java.lang.String VERSION
public static java.lang.String decode(java.lang.String s)
public static java.lang.String decode(java.lang.String s, byte[] aBuffer)
public static byte[] decode(byte[] aInByteArray)
public static byte[] decodeToByteArray(java.lang.String s)
public static java.io.InputStream decode(java.io.InputStream is)
public static byte[] encode(byte[] aInByteArray)
public static java.lang.String encodeToString(byte[] aInByteArray)
public static java.lang.String encodeToString(byte[] aInByteArray, boolean aIncludeLineBreaks)
public static java.lang.String encode(java.lang.String s)
public static java.lang.String encode(java.lang.String s, boolean aIncludeLineBreaks)
public static byte[] encodeToByteArray(java.lang.String s)
public static java.io.OutputStream encode(java.io.OutputStream os)
os
- The OutputStream to target with contentpublic static java.io.OutputStream encode(java.io.OutputStream os, boolean aIncludeLineBreaks)
os
- The OutputStream to target with contentaIncludeLineBreaks
- Include line breaks?public static java.io.OutputStream createEncodingOutputStream(java.io.OutputStream os)
os
- The OutputStream to target with contentpublic static java.io.OutputStream createEncodingOutputStream(java.io.OutputStream os, boolean aIncludeLineBreaks)
os
- The OutputStream to target with contentaIncludeLineBreaks
- Include line breaks?Copyright © 2015 Pegasystems Inc. All Rights Reserved.