uk.org.ogsadai.common
Class Base64
java.lang.Object
|
+--uk.org.ogsadai.common.Base64
- public class Base64
- extends java.lang.Object
A wrapper for an Axis Base64 encoder. This class uses the
org.apache.axis.encoding.Base64
class.
- Author:
- The OGSA-DAI Project Team
- See Also:
Base64
Method Summary |
byte[] |
decode(byte[] bytes)
Base64 decodes a byte array. |
byte[] |
encode(byte[] bytes)
Base64 encode a byte array. |
char[] |
encode(byte[] bytes,
int start,
int length)
Base64 encodes part of a byte array to a char array. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COPYRIGHT_NOTICE
private static final java.lang.String COPYRIGHT_NOTICE
- See Also:
- Constant Field Values
Base64
public Base64()
encode
public byte[] encode(byte[] bytes)
- Base64 encode a byte array.
- Parameters:
bytes
- The source byte array to be encoded.
- Returns:
- An encoded byte array.
encode
public char[] encode(byte[] bytes,
int start,
int length)
- Base64 encodes part of a byte array to a char array.
- Parameters:
bytes
- The source byte array from which data should be encoded.start
- The offset within the array to begin encoding.length
- The length of bytes from the offset to encode.
- Returns:
- A
char
array containing the Base64 encoded bytes.
decode
public byte[] decode(byte[] bytes)
- Base64 decodes a byte array.
- Parameters:
bytes
- The source byte array to be decoded.
- Returns:
- A decoded byte array.