com.act365.net
Class GeneralSocketInputStream

java.lang.Object
java.io.InputStream
com.act365.net.GeneralSocketInputStream
- All Implemented Interfaces:
- java.io.Closeable
- public class GeneralSocketInputStream
- extends java.io.InputStream
GeneralSocketInputStream reads from a TCP socket.
The class should be used in conjunction with GeneralSocketImpl.
|
Constructor Summary |
GeneralSocketInputStream(int socketDescriptor)
Creates an input stream to read from the TCP socket with the given descriptor. |
|
Method Summary |
(package private) static int |
_close(int socketDescriptor)
|
(package private) static int |
_read(int socketDescriptor,
byte[] buffer,
int offset,
int count)
|
void |
close()
Closes the input stream. |
int |
read()
Reads a single character from the TCP stream. |
int |
read(byte[] buffer)
Reads a string of characters from the TCP stream into a buffer. |
int |
read(byte[] buffer,
int offset,
int count)
Reads a string of characters from the TCP stream into a given
location in a buffer. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
socketDescriptor
int socketDescriptor
GeneralSocketInputStream
public GeneralSocketInputStream(int socketDescriptor)
- Creates an input stream to read from the TCP socket with the given descriptor.
read
public int read()
throws java.io.IOException
- Reads a single character from the TCP stream.
read
public int read(byte[] buffer)
throws java.io.IOException
- Reads a string of characters from the TCP stream into a buffer.
read
public int read(byte[] buffer,
int offset,
int count)
throws java.io.IOException
- Reads a string of characters from the TCP stream into a given
location in a buffer.
_read
static int _read(int socketDescriptor,
byte[] buffer,
int offset,
int count)
close
public void close()
throws java.io.IOException
- Closes the input stream.
_close
static int _close(int socketDescriptor)