|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectariba.util.core.Base64
public class Base64
Base64. Utilities for base 64 decoding rfc-1521: Base64 Alphabet See http://info.internet.isi.edu/in-notes/rfc/files/rfc1521.txt
| Field Summary | |
|---|---|
static String |
ClassName
|
static int |
LineSize
|
static char |
PadChar
|
| Constructor Summary | |
|---|---|
Base64()
|
|
| Method Summary | |
|---|---|
static byte[] |
decode(byte[] data,
int start,
int len)
This method decodes the given byte[] using the base64-encoding specified in RFC-1521 (Section 5.2). |
static String |
decode(String string)
This method decodes the given byte[] using the base64-encoding specified in RFC-1521 (Section 5.2). |
static byte[] |
decodeFromString(String string)
The method you wanted to have all along! |
static byte[] |
encode(byte[] data,
int start,
int len)
This method encodes the given byte[] using the base64-encoding specified in RFC-1521 (Section 5.2). |
static String |
encode(String string)
This method encodes the given String using the base64-encoding specified in RFC-1521 (Section 5.2). |
static void |
encodeAndSend(File file,
OutputStream outputStream)
This method will Base64 encode the contents of a file and output it to a specified OutputStream. |
static void |
encodeAndSend(InputStream inputStream,
OutputStream outputStream)
|
static String |
encodeToString(byte[] contents)
The methods you actually wanted ... |
static void |
main(String[] args)
For testing, but not moved to test.ariba.util.core.* because it can be useful for debugging in the field with support. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String ClassName
public static final char PadChar
public static final int LineSize
| Constructor Detail |
|---|
public Base64()
| Method Detail |
|---|
public static String decode(String string)
string - the string to decode.
public static final byte[] decode(byte[] data,
int start,
int len)
data - the base64-encoded data.start - the position in the array to start.len - the number of bytes to decode.
public static String encode(String string)
string - data to be base64-encoded.
public static final byte[] encode(byte[] data,
int start,
int len)
data - data to be base64-encoded.start - the position in the array to start.len - the number of bytes to encode.
public static String encodeToString(byte[] contents)
contents -
public static byte[] decodeFromString(String string)
string - base-64 encoded string
public static final void encodeAndSend(File file,
OutputStream outputStream)
public static final void encodeAndSend(InputStream inputStream,
OutputStream outputStream)
throws IOException
IOExceptionpublic static void main(String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||