|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.InputStream java.io.FilterInputStream netcom.util.WrappedInputStream
This input stream works in conjunction with the WrappedOutputStream to introduce a protocol for reading arbitrary length data in a uniform way.
Note: See the javadoc for WrappedOutputStream for more information.
WrappedOutputStream
Field Summary | |
protected boolean |
fClosed
To mark that the stream is "closed". |
protected java.io.DataInputStream |
fDataInputStream
Data input stream. |
protected int |
fPacketCount
Bytes left on input stream for current packet. |
Fields inherited from class java.io.FilterInputStream |
in |
Constructor Summary | |
WrappedInputStream(java.io.InputStream stream)
Constructs a wrapper for the given an input stream. |
Method Summary | |
void |
close()
Closes the input stream. |
int |
read()
Reads a single byte. |
int |
read(byte[] b,
int offset,
int length)
Reads a block of bytes and returns the total number of bytes read. |
long |
skip(long n)
Skips the specified number of bytes from the input stream. |
Methods inherited from class java.io.FilterInputStream |
available, mark, markSupported, read, reset |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int fPacketCount
protected java.io.DataInputStream fDataInputStream
Note: The data input stream is only used for reading the byte count for performance reasons. We avoid the method indirection for reading the byte data.
protected boolean fClosed
Constructor Detail |
public WrappedInputStream(java.io.InputStream stream)
Method Detail |
public int read() throws java.io.IOException
java.io.IOException
public int read(byte[] b, int offset, int length) throws java.io.IOException
java.io.IOException
public long skip(long n) throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
Note: This method does not close the underlying input stream.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |