| java.lang.Object java.io.InputStream java.io.FilterInputStream net.sourceforge.groboutils.util.io.v1.MimeInputStream
MimeInputStream | public class MimeInputStream extends FilterInputStream (Code) | | java.io.FilterInputStream implementation for Mime base 64. Not incredibly
efficient, but it works and is small.
All we need to implement are:
read(int)
read( byte b[], int off, int len )
skip( long n ) - for translating the # of bytes to skip into mime bytes (4-to-3 ratio)
available() - for the same reason as skip
author: Matt Albrecht groboclown@users.sourceforge.net since: 0.9.0 Alpha (early 2000) version: $Date: 2003/02/10 22:52:45 $ |
Method Summary | |
public int | available() Returns the number of bytes that can be read from this input
stream without blocking. | public int | read() Write the specified byte , performing mime encoding. | public long | skip(long n) Skips over and discards n bytes of data from the
input stream. |
available | public int available() throws IOException(Code) | | Returns the number of bytes that can be read from this input
stream without blocking.
This method performs in.available(n) , does the mime-size
conversion, and returns the result.
the number of bytes that can be read from the input streamwithout blocking. exception: IOException - if an I/O error occurs. See Also: java.io.FilterInputStream.in |
read | public int read() throws IOException(Code) | | Write the specified byte , performing mime encoding.
Override this method, since all other write methods call it.
exception: IOException - If an I/O error occurs |
skip | public long skip(long n) throws IOException(Code) | | Skips over and discards n bytes of data from the
input stream. The skip method may, for a variety of
reasons, end up skipping over some smaller number of bytes,
possibly 0 . The actual number of bytes skipped is
returned.
This method performs in.skip(n) , followed by a quick
translation to mime size.
Parameters: n - the number of bytes to be skipped. the actual number of bytes skipped. exception: IOException - if an I/O error occurs. |
|
|