|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.webmethods.rtl.encode.Base64
public class Base64
Provides Base64 encoding and decoding as defined by RFC 2045.
This class implements section 6.8. Base64 Content-Transfer-Encoding from RFC 2045 Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies by Freed and Borenstein.
Constructor Summary | |
---|---|
Base64()
|
Method Summary | |
---|---|
static byte[] |
decode(byte[] base64Data)
Decodes Base64 data into octects |
static byte[] |
encode(byte[] pArray)
Encodes a byte[] containing binary data, into a byte[] containing characters in the Base64 alphabet. |
static String |
encode(String data)
Returns the base64 encoding of String. |
static String |
encode(String data,
String charEncoding)
Returns the base64 encoding of String (by first converting to byte[], using the specified charEncoding ). |
static byte[] |
encodeBase64(byte[] binaryData)
Encodes binary data using the base64 algorithm but does not chunk the output. |
static boolean |
isBase64(byte octect)
|
static boolean |
isBase64(byte[] arrayOctect)
Tests a given byte array to see if it contains only valid characters within the Base64 alphabet. |
static boolean |
isBase64(String isValidString)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Base64()
Method Detail |
---|
public static boolean isBase64(byte octect)
public static boolean isBase64(byte[] arrayOctect)
arrayOctect
- byte array to test
public static boolean isBase64(String isValidString)
public static byte[] encodeBase64(byte[] binaryData)
binaryData
- binary data to encode
public static byte[] decode(byte[] base64Data)
base64Data
- Byte array containing Base64 data
public static byte[] encode(byte[] pArray)
pArray
- a byte array containing binary data
public static String encode(String data, String charEncoding) throws UnsupportedEncodingException
charEncoding
). The
return value is also a String. The Default
codeEncoding is ISO-8859-1
.
- Parameters:
data
- String of data to convertcharEncoding
- the character encoding to use when converting
a String to a byte[]
- Returns:
- Base64-encoded String
- Throws:
UnsupportedEncodingException
encode
public static String encode(String data)
- Returns the base64 encoding of String. First the String is
converted to byte[], using the character encoding of
ISO-8859-1
.
- Parameters:
data
- String of data to convert
- Returns:
- Base64-encoded String
Overview
Package
Class
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD