|
|||||||||
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 java.lang.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 java.lang.String |
decode(java.lang.String string)
This method decodes the given byte[] using the base64-encoding specified in RFC-1521 (Section 5.2). |
static byte[] |
decodeFromString(java.lang.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 java.lang.String |
encode(java.lang.String string)
This method encodes the given String using the base64-encoding specified in RFC-1521 (Section 5.2). |
static void |
encodeAndSend(java.io.File file,
java.io.OutputStream outputStream)
This method will Base64 encode the contents of a file and output it to a specified OutputStream. |
static void |
encodeAndSend(java.io.InputStream inputStream,
java.io.OutputStream outputStream)
|
static java.lang.String |
encodeToString(byte[] contents)
The methods you actually wanted ... |
static void |
main(java.lang.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 java.lang.String ClassName
public static final char PadChar
public static final int LineSize
Constructor Detail |
---|
public Base64()
Method Detail |
---|
public static java.lang.String decode(java.lang.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 java.lang.String encode(java.lang.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 java.lang.String encodeToString(byte[] contents)
contents
-
public static byte[] decodeFromString(java.lang.String string)
string
- base-64 encoded string
public static final void encodeAndSend(java.io.File file, java.io.OutputStream outputStream)
public static final void encodeAndSend(java.io.InputStream inputStream, java.io.OutputStream outputStream) throws java.io.IOException
java.io.IOException
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |