|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.novell.xml.util.Base64Codec
Collection of simple static methods for encoding/decoding
binary data as base 64 encoded information. These methods are
implemented in terms of com.novell.java.io.Base64InputStream
and
com.novell.io.Base64OutputStream
.
If encoding/decoding from to/from streams rather than strings it will be more
efficient to use the Base64InputStream
/Base64OutputStream
classes.
Base64InputStream
,
Base64OutputStream
Constructor Summary | |
Base64Codec()
|
Method Summary | |
static byte[] |
decode(char[] encodedData)
Decode an array base 64 encoded data. |
static byte[] |
decode(char[] encodedData,
int off,
int len)
Decode an array base 64 encoded data. |
static byte[] |
decode(String encodedData)
Decode a string of base 64 encoded data. |
static char[] |
encode(byte[] data)
Encode an array of binary data using base 64 encoding. |
static char[] |
encode(byte[] data,
boolean wrap)
Encode an array of binary data using base 64 encoding. |
static char[] |
encode(byte[] data,
int off,
int len)
Encode an array of binary data using base 64 encoding. |
static char[] |
encode(byte[] data,
int off,
int len,
boolean wrap)
Encode an array of binary data using base 64 encoding. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Base64Codec()
Method Detail |
public static byte[] decode(String encodedData) throws IOException
encodedData
- The encoded data.
byte
s containing the decoded data
IOException
- Thrown if the encoded data is malformed.public static byte[] decode(char[] encodedData) throws IOException
encodedData
- The encoded data.
byte
s containing the decoded data
IOException
- Thrown if the encoded data is malformed.public static byte[] decode(char[] encodedData, int off, int len) throws IOException
encodedData
- The encoded data.off
- The staring offset in encodedData
.len
- The number of characters in encodedData
to decode.
byte
s containing the decoded data
IOException
- Thrown if the encoded data is malformed.public static char[] encode(byte[] data)
data
- The array of data to encode.
char
s containing the encoded datapublic static char[] encode(byte[] data, boolean wrap)
data
- The array of data to encode.wrap
- true if should wrap lines
char
s containing the encoded datapublic static char[] encode(byte[] data, int off, int len)
data
- The array of data to encode.off
- The starting offset in data
len
- The number of bytes to encode in data
char
s containing the encoded datapublic static char[] encode(byte[] data, int off, int len, boolean wrap)
data
- The array of data to encode.off
- The starting offset in data
len
- The number of bytes to encode in data
wrap
- true if should wrap lines
char
s containing the encoded data
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |