public interface ClientService
| Modifier and Type | Field and Description |
|---|---|
static int |
BLOCKING |
static int |
NON_BLOCKING |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this socket.
|
void |
connect(java.lang.String host,
int port)
Connects this socket to the server.
|
int |
getMode()
Returns the client mode.
|
java.net.Socket |
getSocket()
Returns the Socket class that is used to communicate .
|
boolean |
isConnected()
Returns the connection state of the socket.
|
int |
readByte()
Read next byte
|
byte[] |
readBytes()
Read binary data
|
java.lang.String |
readBytes(java.lang.String charset)
Read bytes (String)
|
java.lang.String |
readLine()
Read String appended with \r\n
|
java.lang.Object |
readObject()
Read String appended
|
void |
sendByte(int data)
Send binary data
|
void |
sendBytes(byte[] data)
Send binary data
|
void |
sendBytes(java.lang.String data,
java.lang.String charset)
Send bytes (String)
|
void |
sendLine(java.lang.String data,
java.lang.String charset)
Send String appended with \r\n
|
void |
sendObject(java.lang.Object data)
Send object
|
static final int BLOCKING
static final int NON_BLOCKING
int getMode()
void connect(java.lang.String host,
int port)
throws java.lang.Exception
java.lang.Exceptionboolean isConnected()
void close()
throws java.io.IOException
java.io.IOExceptionvoid sendByte(int data)
throws java.io.IOException
java.io.IOExceptionvoid sendBytes(byte[] data)
throws java.io.IOException
java.io.IOExceptionvoid sendBytes(java.lang.String data,
java.lang.String charset)
throws java.io.IOException
java.io.IOExceptionvoid sendLine(java.lang.String data,
java.lang.String charset)
throws java.io.IOException
java.io.IOExceptionvoid sendObject(java.lang.Object data)
throws java.io.IOException
java.io.IOExceptionint readByte()
throws java.io.IOException
java.io.IOExceptionbyte[] readBytes()
throws java.io.IOException
java.io.IOExceptionjava.lang.String readBytes(java.lang.String charset)
throws java.io.IOException
java.io.IOExceptionjava.lang.String readLine()
throws java.io.IOException
java.io.IOExceptionjava.lang.Object readObject()
throws java.io.IOException,
java.lang.ClassNotFoundException
java.io.IOExceptionjava.lang.ClassNotFoundExceptionjava.net.Socket getSocket()
Copyright © 2003-2014 QuickServer.org