| java.io.FileInputStream java.net.SocketInputStream
SocketInputStream | class SocketInputStream extends FileInputStream (Code) | | This stream extends FileInputStream to implement a
SocketInputStream. Note that this class should NOT be
public.
version: 1.23, 02/02/00 author: Jonathan Payne author: Arthur van Hoff |
Method Summary | |
public int | available() Returns the number of bytes that can be read without blocking. | public void | close() | protected void | finalize() Overrides finalize, the fd is closed by the Socket. | public int | read(byte b) Reads into a byte array data from the socket. | public int | read(byte b, int off, int length) Reads into a byte array b at offset off,
length bytes of data.
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 actual number of bytes read, -1 isreturned when the end of the stream is reached. | public int | read() Reads a single byte from the socket. | void | setEOF(boolean eof) | public long | skip(long numbytes) Skips n bytes of input. |
SocketInputStream | SocketInputStream(PlainSocketImpl impl) throws IOException(Code) | | Creates a new SocketInputStream. Can only be called
by a Socket. This method needs to hang on to the owner Socket so
that the fd will not be closed.
Parameters: impl - the implemented socket input stream |
available | public int available() throws IOException(Code) | | Returns the number of bytes that can be read without blocking.
the number of immediately available bytes |
finalize | protected void finalize()(Code) | | Overrides finalize, the fd is closed by the Socket.
|
read | public int read(byte b) throws IOException(Code) | | Reads into a byte array data from the socket.
Parameters: b - the buffer into which the data is read the actual number of bytes read, -1 isreturned when the end of the stream is reached. exception: IOException - If an I/O error has occurred. |
read | public int read(byte b, int off, int length) throws IOException(Code) | | Reads into a byte array b at offset off,
length bytes of data.
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 actual number of bytes read, -1 isreturned when the end of the stream is reached. exception: IOException - If an I/O error has occurred. |
setEOF | void setEOF(boolean eof)(Code) | | |
skip | public long skip(long numbytes) throws IOException(Code) | | Skips n bytes of input.
Parameters: n - the number of bytes to skip the actual number of bytes skipped. exception: IOException - If an I/O error has occurred. |
|
|