org.metasyntactic.codec.uu
Class UUEncoder

java.lang.Object
  |
  +--org.metasyntactic.codec.uu.UUEncoder
All Implemented Interfaces:
Encoder, java.lang.Runnable

public class UUEncoder
extends java.lang.Object
implements Encoder


Constructor Summary
UUEncoder(java.io.InputStream in, java.io.OutputStream out)
          Set's up the encoder to read in data from 'in' and write it to 'out' in UU form.
UUEncoder(java.io.InputStream i, java.io.OutputStream o, int permission, java.lang.String name)
          Set's up the encoder to read in data from 'in' and write it to 'out' in UU form.
 
Method Summary
static void main(java.lang.String[] args)
           
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UUEncoder

public UUEncoder(java.io.InputStream in,
                 java.io.OutputStream out)
          throws java.io.IOException
Set's up the encoder to read in data from 'in' and write it to 'out' in UU form. Note! This constructor will not write the string "begin 'permission' filename" before the uuencoded data. It is up to you to write that string to the outputstream yourself. Otherwise, use the alternate constructor for this class.

Parameters:
in - The inputstream to read the unencoded data from
out - The outputstream to write the uu-encoded data to
Throws:
java.io.IOException - whenever an IOException occurs inside one of the streams passed in

UUEncoder

public UUEncoder(java.io.InputStream i,
                 java.io.OutputStream o,
                 int permission,
                 java.lang.String name)
          throws java.io.IOException
Set's up the encoder to read in data from 'in' and write it to 'out' in UU form. Note! This constructor will write the string "begin 'permission' filename" before the uuencoded data.

Parameters:
permission - The permission in uniz style form of the file that was encoded
name - The name of the file that was encoded
Throws:
java.io.IOException - whenever an IOException occurs inside one of the streams passed in
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable

main

public static void main(java.lang.String[] args)