|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SocketInterface
The socket interface for the PeerBase system. Methods for reading and writing are modelled after the basic InputStream/OutputStream classes of the Java library.
| Method Summary | |
|---|---|
void |
close()
Closes this connection and releases any system resources associated with the socket. |
int |
read()
Reads the next byte of data from the socket connection. |
int |
read(byte[] b)
Reads some number of bytes from the socket connection and stores them into the buffer array b. |
void |
write(byte[] b)
Writes b.length bytes from the specified byte array to this socket connection. |
| Method Detail |
|---|
void write(byte[] b)
throws java.io.IOException
b - the data
java.io.IOException - if an I/O error occurs
int read()
throws java.io.IOException
java.io.IOException - if an I/O error occurs
int read(byte[] b)
throws java.io.IOException
b - the buffer into which the data is read
java.io.IOException - if an I/O error occursInputStream#read()
void close()
throws java.io.IOException
java.io.IOException - if an I/O error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||