com.sun.multicast.util
Class BASE64Encoder

java.lang.Object
  |
  +--com.sun.multicast.util.BASE64Encoder

public class BASE64Encoder
extends java.lang.Object

A BASE64 encoder/decoder. This class provides methods that encode and decode byte arrays to and from the BASE64 encoding (as defined in RFC 2045). The only aspect of BASE64 encoding that is not supported is line folding. No line terminators are created or expected. This feature could be added fairly easily.


Constructor Summary
BASE64Encoder()
           
 
Method Summary
static byte[] decode(byte[] in)
          Perform BASE64 decoding (without line endings).
static byte[] encode(byte[] in)
          Perform BASE64 encoding (without line endings).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BASE64Encoder

public BASE64Encoder()
Method Detail

encode

public static byte[] encode(byte[] in)
Perform BASE64 encoding (without line endings).
Parameters:
in - input bytes
Returns:
output bytes

decode

public static byte[] decode(byte[] in)
                     throws BadBASE64Exception
Perform BASE64 decoding (without line endings).
Parameters:
in - input bytes
Returns:
output bytes
Throws:
BadBASE64Exception - if the encoded data is corrupt


JavaTM Reliable MulticastTM Service version 1.1
Copyright (c) 2001, Sun Microsystems Laboratories, All rights reserved.