uk.org.ogsadai.common.wsrf
Class Base64

java.lang.Object
  |
  +--uk.org.ogsadai.common.wsrf.Base64
All Implemented Interfaces:
Base64

public class Base64
extends java.lang.Object
implements Base64

This class is a wrapper for whichever Base-64 encoder OGSA-DAI chooses to use.

Author:
The OGSA-DAI Project Team

Constructor Summary
Base64()
           
 
Method Summary
 byte[] decode(byte[] bytes)
          Base64 decodes a byte array.
 byte[] encode(byte[] bytes)
          Base64 encodes 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
 

Constructor Detail

Base64

public Base64()
Method Detail

encode

public byte[] encode(byte[] bytes)
Base64 encodes a byte array. Uses org.apache.axis.encoding.Base64

Specified by:
encode in interface Base64
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. Uses org.apache.axis.encoding.Base64

Specified by:
encode in interface Base64
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 bae-64 encoded bytes

decode

public byte[] decode(byte[] bytes)
Base64 decodes a byte array. Uses org.apache.axis.encoding.Base64

Specified by:
decode in interface Base64
Parameters:
bytes - The source byte array to be decoded
Returns:
A decoded byte array