org.apache.tools.ant.util

Class UUEncoder

public class UUEncoder extends Object

UUEncoding of an input stream placed into an outputstream. This class is meant to be a drop in replacement for sun.misc.UUEncoder, which was previously used by Ant. The uuencode algorithm code has been copied from the geronimo project.
Field Summary
protected static intDEFAULT_MODE
Constructor Summary
UUEncoder(String name)
Constructor specifing a name for the encoded buffer, begin line will be:
   begin 644 [NAME]
 
Method Summary
voidencode(InputStream is, OutputStream out)
UUEncode bytes from the input stream, and write them as text characters to the output stream.

Field Detail

DEFAULT_MODE

protected static final int DEFAULT_MODE

Constructor Detail

UUEncoder

public UUEncoder(String name)
Constructor specifing a name for the encoded buffer, begin line will be:
   begin 644 [NAME]
 

Parameters: name the name of the encoded buffer.

Method Detail

encode

public void encode(InputStream is, OutputStream out)
UUEncode bytes from the input stream, and write them as text characters to the output stream. This method will run until it exhausts the input stream.

Parameters: is the input stream. out the output stream.

Throws: IOException if there is an error.