org.codehaus.cargo.util
Class Base64

java.lang.Object
  extended byorg.codehaus.cargo.util.Base64

public final class Base64
extends java.lang.Object

Provides utility methods to Base64 encode data. This class uses the Base64 encoding as specified in RFC 2045, 6.8. Base64 Content-Transfer-Encoding.

Version:
$Id: Base64.java 530 2005-10-04 20:59:29Z mark $

Method Summary
static byte[] encode(byte[] bytes)
          Base64 encodes the specified bytes.
static java.lang.String encode(java.lang.String string)
          Base64 encodes the specified string using the platform's default encoding.
static byte[] encodeBase64(byte[] bytes)
          Base64 encodes the specified bytes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

encodeBase64

public static byte[] encodeBase64(byte[] bytes)
Base64 encodes the specified bytes. This method is provided for signature compatibility with commons-codec.

Parameters:
bytes - the bytes to encode
Returns:
the encoded bytes

encode

public static java.lang.String encode(java.lang.String string)
Base64 encodes the specified string using the platform's default encoding.

Parameters:
string - the string to encode
Returns:
the encoded string

encode

public static byte[] encode(byte[] bytes)
Base64 encodes the specified bytes.

Parameters:
bytes - the bytes to encode
Returns:
the encoded bytes


Copyright © 2004-2008 Codehaus. All Rights Reserved.