| java.lang.Object java.io.InputStream com.quadcap.io.DotStuffInputStream
DotStuffInputStream | public class DotStuffInputStream extends InputStream (Code) | | A filter input stream that performs dot-unstuffing.
author: Stan Bailes |
Field Summary | |
final static byte | CR | final static byte | DT | final static int | END | final static int | INIT | final static byte | LF | final static int | S1 | final static int | S2 | final static int | S3 | final static int | S4 | InputStream | in | int | savec | int | state |
Method Summary | |
public int | read() Reads the next byte of data from this input stream. | public int | read(byte b, int off, int len) Reads up to len bytes of data from this input stream
into an array of bytes. | public long | skip(long n) Skips over and discards n bytes of data from the
input stream. |
INIT | final static int INIT(Code) | | |
read | public int read() throws IOException(Code) | | Reads the next byte of data from this input stream. The value
byte is returned as an int in the range
0 to 255 . If no byte is available
because the end of the stream has been reached, the value
-1 is returned. This method blocks until input data
is available, the end of the stream is detected, or an exception
is thrown.
The read method of DotStuffInputStream
returns -1 when the characteristic 'single dot on a line by itself'
end signature, and removes all leading dots otherwise.
the next byte of data, or -1 if the end of thestream is reached. exception: IOException - if an I/O error occurs. |
read | public int read(byte b, int off, int len) throws IOException(Code) | | Reads up to len bytes of data from this input stream
into an array of bytes. This method blocks until some input is
available.
Parameters: b - the buffer into which the data is read. Parameters: off - the start offset of the data. Parameters: len - the maximum number of bytes read. the total number of bytes read into the buffer, or-1 if there is no more data because the end ofthe stream has been reached. 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.
Parameters: n - the number of bytes to be skipped. the actual number of bytes skipped. exception: IOException - if an I/O error occurs. |
|
|