|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
gnu.inet.util.MessageInputStream
public class MessageInputStream
A utility class for feeding message contents to messages.
This stream returns -1 from read
when the stream termination
sequence LF,END,LF is read from the underlying stream.
Field Summary | |
---|---|
protected int |
buf1
|
protected int |
buf2
|
static int |
END
The stream termination octet ('.'). |
protected boolean |
eof
|
static int |
LF
The line termination octet ('\n'). |
protected int |
markBuf1
|
protected int |
markBuf2
|
Fields inherited from class java.io.FilterInputStream |
---|
in |
Constructor Summary | |
---|---|
MessageInputStream(java.io.InputStream in)
Constructs a message input stream connected to the specified input stream. |
Method Summary | |
---|---|
void |
mark(int readlimit)
|
boolean |
markSupported()
|
int |
read()
Reads the next byte of data from this message input stream. |
int |
read(byte[] b)
Reads up to b.length bytes of data from this input stream into an array of bytes. |
int |
read(byte[] b,
int off,
int len)
Reads up to len bytes of data from this input stream into an array of bytes, starting at the specified offset. |
void |
reset()
|
Methods inherited from class java.io.FilterInputStream |
---|
available, close, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int END
public static final int LF
protected boolean eof
protected int buf1
protected int buf2
protected int markBuf1
protected int markBuf2
Constructor Detail |
---|
public MessageInputStream(java.io.InputStream in)
Method Detail |
---|
public int read() throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
- if an I/O error occurspublic int read(byte[] b) throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
- if an I/O error occurspublic int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
- if an I/O error occurspublic boolean markSupported()
markSupported
in class java.io.FilterInputStream
public void mark(int readlimit)
mark
in class java.io.FilterInputStream
public void reset() throws java.io.IOException
reset
in class java.io.FilterInputStream
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |