|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.starteam.util.Base64
public final class Base64
A utility class for encoding and decoding binary data in base64. More information on base64 encoding can be found in RFC 2045 - Multipurpose Internet Mail Extensions (MIME) part one.
| Method Summary | |
|---|---|
static byte[] |
decode(java.lang.String data)
Returns the byte array represented by the specified base64 encoded data. |
static java.lang.String |
decodeAsString(java.lang.String data)
Returns the String decoding of the specified base64 encoded data. |
static void |
decodeToFile(java.lang.String data,
java.io.File outFile)
Decodes the specified base64 encoded data but puts the output in to the specified File. |
static void |
decodeToStream(java.lang.String data,
java.io.OutputStream out)
Decodes the specified base64 encoded data but puts the output in to the specified OutputStream. |
static java.lang.String |
encode(byte[] data)
Returns a String encoding of the specified data in base64. |
static byte[] |
encodeBytes(byte[] data,
int pos,
int len)
Returns a byte array encoding of the specified data in base64. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.lang.String encode(byte[] data)
data - the data to be encoded
public static java.lang.String decodeAsString(java.lang.String data)
data - the base64 encoded data to be decoded
public static byte[] decode(java.lang.String data)
data - the base64 data to be decoded
public static void decodeToFile(java.lang.String data,
java.io.File outFile)
throws java.io.IOException
data - a base64 encoding of some dataoutFile - the file to which the decoded data is to be written
java.io.IOException
public static void decodeToStream(java.lang.String data,
java.io.OutputStream out)
throws java.io.IOException
data - a base64 encoding of some dataout - the OutputStream to which the decoded data is to be written
java.io.IOException
public static byte[] encodeBytes(byte[] data,
int pos,
int len)
data - the data to be encodedpos - the starting position of the data to be encodedlen - the length of data to be encoded
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||