com.sun.xml.messaging.saaj.packaging.mime.util
Class UUEncoderStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
com.sun.xml.messaging.saaj.packaging.mime.util.UUEncoderStream
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable
public class UUEncoderStream
- extends java.io.FilterOutputStream
This class implements a UUEncoder. It is implemented as
a FilterOutputStream, so one can just wrap this class around
any output stream and write bytes into this filter. The Encoding
is done as the bytes are written out.
Field Summary |
protected int |
mode
|
protected java.lang.String |
name
|
Fields inherited from class java.io.FilterOutputStream |
out |
Constructor Summary |
UUEncoderStream(java.io.OutputStream out)
Create a UUencoder that encodes the specified input stream |
UUEncoderStream(java.io.OutputStream out,
java.lang.String name)
Create a UUencoder that encodes the specified input stream |
UUEncoderStream(java.io.OutputStream out,
java.lang.String name,
int mode)
Create a UUencoder that encodes the specified input stream |
Method Summary |
void |
close()
|
void |
flush()
|
void |
setNameMode(java.lang.String name,
int mode)
Set up the buffer name and permission mode. |
void |
write(byte[] data)
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(int c)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
name
protected java.lang.String name
mode
protected int mode
UUEncoderStream
public UUEncoderStream(java.io.OutputStream out)
- Create a UUencoder that encodes the specified input stream
- Parameters:
out
- the output stream
UUEncoderStream
public UUEncoderStream(java.io.OutputStream out,
java.lang.String name)
- Create a UUencoder that encodes the specified input stream
- Parameters:
out
- the output streamname
- Specifies a name for the encoded buffer
UUEncoderStream
public UUEncoderStream(java.io.OutputStream out,
java.lang.String name,
int mode)
- Create a UUencoder that encodes the specified input stream
- Parameters:
out
- the output streamname
- Specifies a name for the encoded buffermode
- Specifies permission mode for the encoded buffer
setNameMode
public void setNameMode(java.lang.String name,
int mode)
- Set up the buffer name and permission mode.
This method has any effect only if it is invoked before
you start writing into the output stream
write
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
- Overrides:
write
in class java.io.FilterOutputStream
- Throws:
java.io.IOException
write
public void write(byte[] data)
throws java.io.IOException
- Overrides:
write
in class java.io.FilterOutputStream
- Throws:
java.io.IOException
write
public void write(int c)
throws java.io.IOException
- Overrides:
write
in class java.io.FilterOutputStream
- Throws:
java.io.IOException
flush
public void flush()
throws java.io.IOException
- Specified by:
flush
in interface java.io.Flushable
- Overrides:
flush
in class java.io.FilterOutputStream
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class java.io.FilterOutputStream
- Throws:
java.io.IOException