Constructor and Description |
---|
SocketConnector(java.net.InetAddress address,
int port) |
Modifier and Type | Method and Description |
---|---|
boolean |
available()
Returns true if there is currently data available for
reading.
|
protected void |
checkClosed() |
void |
close()
Closes the connection.
|
boolean |
isConnected()
Returns true if this connector is currently connected.
|
java.nio.ByteBuffer |
read()
Reads a chunk of data from the connection, blocking if
there is no data available.
|
void |
write(java.nio.ByteBuffer data)
Writes a chunk of data to the connection from data.position()
to data.limit().
|
public SocketConnector(java.net.InetAddress address, int port) throws java.io.IOException
java.io.IOException
protected void checkClosed()
public boolean isConnected()
Connector
isConnected
in interface Connector
public void close()
Connector
public boolean available()
Connector
public java.nio.ByteBuffer read()
Connector