gnu.mail.util
Class UUDecoderStream
FilterInputStreamgnu.mail.util.UUDecoderStream
public class UUDecoderStream
extends FilterInputStream
A stream that does UU Decoding.
UU-Decoding is defined in the MIME rfcs.
protected int | mode- permission mode of file.
|
protected String | name- name of file to be uudecoded.
|
mode
protected int mode
permission mode of file.
name
protected String name
name of file to be uudecoded.
UUDecoderStream
public UUDecoderStream(InputStream in)
create a new UU-Decoding stream.
available
public int available()
throws IOException- the number of bytes that are available that will not block.
getMode
public int getMode()
throws IOExceptionget mode from UU-Decoding.
- File permission mode
getName
public String getName()
throws IOException- Name of file
markSupported
public boolean markSupported()
- false because mark is not supported in UU Decoding.
read
public int read()
throws IOException Read byte from decoded buffer.
If buffer empty, the next line of encoded bytes
is read and decoded.
- next byte
read
public int read(byte[] bytes,
int offset,
int length)
throws IOException Read byte from decoded buffer.
If buffer empty, the next line of encoded bytes is read and decoded.
bytes - Byte array to write bytes intooffset - Offset of array to writelength - Number of bytes to write
- Number of bytes read