|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgcspy.comm.Client
public class Client
All the socket stuff wrapped up
| Constructor Summary | |
|---|---|
Client(java.net.Socket socket,
int maxLen)
Create a new client |
|
Client(java.lang.String server,
int port,
int maxLen)
Create a new client |
|
| Method Summary | |
|---|---|
void |
close()
Close the client |
BufferedInput |
createBufferedInput()
Create a new input buffered |
BufferedOutput |
createBufferedOutput()
Creatre a new output buffer |
void |
definitelyReceive()
Receive a stream into the inBuffer |
byte[] |
getBufferIn()
Return the input buffer |
byte[] |
getBufferOut()
Return the output buffer |
int |
getLen()
Return the length of the in/out buffer |
boolean |
hasTerminated()
Has the input terminated? |
void |
receive()
Receive a stream into the inBuffer |
void |
send(BufferedOutput output)
Send a stream |
void |
send(byte[] buffer)
Send a stream using a buffer |
void |
send(byte[] buffer,
int len)
Send a stream using the prefix of a buffer |
void |
send(int len)
Send the outBuffer as a stream |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
Client(java.net.Socket socket,
int maxLen)
throws java.io.IOException
socket - The socket on which to communicatemaxLen - Maximum buffer size
java.io.IOException
public Client(java.lang.String server,
int port,
int maxLen)
throws java.io.IOException
server - The name of the serverport - The port numbermaxLen - Maximum length of the stream
java.io.IOException| Method Detail |
|---|
public void close()
throws java.io.IOException
java.io.IOException
public void send(byte[] buffer)
throws java.io.IOException
buffer - The buffer.
java.io.IOException
public void send(byte[] buffer,
int len)
throws java.io.IOException
buffer - the buffer to sendlen - its length
java.io.IOException
public void send(int len)
throws java.io.IOException
len - the length of the buffer to send
java.io.IOException
public void send(BufferedOutput output)
throws java.io.IOException
output - the BufferedOutput to send
java.io.IOExceptionpublic byte[] getBufferOut()
public void definitelyReceive()
throws java.io.IOException
java.io.IOException
public void receive()
throws java.io.IOException
java.io.IOExceptionpublic byte[] getBufferIn()
public boolean hasTerminated()
public int getLen()
public BufferedInput createBufferedInput()
public BufferedOutput createBufferedOutput()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||