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.Exception
boolean isConnected()
void close() throws java.io.IOException
java.io.IOException
void sendByte(int data) throws java.io.IOException
java.io.IOException
void sendBytes(byte[] data) throws java.io.IOException
java.io.IOException
void sendBytes(java.lang.String data, java.lang.String charset) throws java.io.IOException
java.io.IOException
void sendLine(java.lang.String data, java.lang.String charset) throws java.io.IOException
java.io.IOException
void sendObject(java.lang.Object data) throws java.io.IOException
java.io.IOException
int readByte() throws java.io.IOException
java.io.IOException
byte[] readBytes() throws java.io.IOException
java.io.IOException
java.lang.String readBytes(java.lang.String charset) throws java.io.IOException
java.io.IOException
java.lang.String readLine() throws java.io.IOException
java.io.IOException
java.lang.Object readObject() throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
java.net.Socket getSocket()
Copyright © 2003-2014 QuickServer.org