SK.gnome.dwarf.utils
Class BASE64

java.lang.Object
  extended bySK.gnome.dwarf.utils.BASE64

public final class BASE64
extends java.lang.Object

Provides BASE64 encoder/decoder.


Constructor Summary
BASE64()
           
 
Method Summary
static byte[] decode(java.lang.String s)
          Converts the given BASE64 string to byte octets.
static java.lang.String encode(byte[] b)
          Converts the given octets to BASE64 string.
 
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 static java.lang.String encode(byte[] b)
Converts the given octets to BASE64 string.

The returned string is without any line termination and may exceed the common 76 characters length limit.

Parameters:
b - the byte octets
Returns:
the BASE64 encoded string

decode

public static byte[] decode(java.lang.String s)
                     throws java.io.IOException
Converts the given BASE64 string to byte octets.

Any non-base64 characters are ignored in the input string.

Parameters:
s - the BASE64 encoded string
Returns:
the decoded byte octets
Throws:
java.io.IOException - if a decoding error occurs


Copyright (c) 1999-2005, Gnome Ltd. All rights reserved.