org.apache.geronimo.mail.util
Class UUEncode

java.lang.Object
  extended by org.apache.geronimo.mail.util.UUEncode

public class UUEncode
extends Object


Constructor Summary
UUEncode()
           
 
Method Summary
static byte[] decode(byte[] data)
          decode the UUEncoded input data.
static byte[] decode(String data)
          decode the UUEncided String data.
static int decode(String data, OutputStream out)
          decode the UUEncoded encoded String data writing it to the given output stream.
static byte[] encode(byte[] data)
          encode the input data producing a UUEncoded byte array.
static byte[] encode(byte[] data, int off, int length)
          encode the input data producing a UUEncoded byte array.
static int encode(byte[] data, int off, int length, OutputStream out)
          UUEncode the byte data writing it to the given output stream.
static int encode(byte[] data, OutputStream out)
          UUEncode the byte data writing it to the given output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UUEncode

public UUEncode()
Method Detail

encode

public static byte[] encode(byte[] data)
encode the input data producing a UUEncoded byte array.

Returns:
a byte array containing the UUEncoded data.

encode

public static byte[] encode(byte[] data,
                            int off,
                            int length)
encode the input data producing a UUEncoded byte array.

Returns:
a byte array containing the UUEncoded data.

encode

public static int encode(byte[] data,
                         OutputStream out)
                  throws IOException
UUEncode the byte data writing it to the given output stream.

Returns:
the number of bytes produced.
Throws:
IOException

encode

public static int encode(byte[] data,
                         int off,
                         int length,
                         OutputStream out)
                  throws IOException
UUEncode the byte data writing it to the given output stream.

Returns:
the number of bytes produced.
Throws:
IOException

decode

public static byte[] decode(byte[] data)
decode the UUEncoded input data. It is assumed the input data is valid.

Returns:
a byte array representing the decoded data.

decode

public static byte[] decode(String data)
decode the UUEncided String data.

Returns:
a byte array representing the decoded data.

decode

public static int decode(String data,
                         OutputStream out)
                  throws IOException
decode the UUEncoded encoded String data writing it to the given output stream.

Returns:
the number of bytes produced.
Throws:
IOException


Copyright © 2003-2009 The Apache Software Foundation. All Rights Reserved.