public interface Connection
| Modifier and Type | Field and Description |
|---|---|
static int |
NO_HINT_VALUE |
| Modifier and Type | Method and Description |
|---|---|
void |
connect(java.lang.String hostname,
int port) |
void |
disconnect() |
boolean |
isConnected() |
int |
readInto(java.nio.ByteBuffer byteBuffer)
Reads as many bytes from the input channel of this Connection into the provided ByteBuffer.
|
void |
writeFrom(java.nio.ByteBuffer byteBuffer)
Writes as many bytes from the byteBuffer to the output channel of this Connection.
|
static final int NO_HINT_VALUE
void connect(java.lang.String hostname,
int port)
throws java.io.IOException
java.io.IOExceptionvoid disconnect()
throws java.io.IOException
java.io.IOExceptionvoid writeFrom(java.nio.ByteBuffer byteBuffer)
throws java.io.IOException
byteBuffer - source of the bytes to writejava.io.IOException - if anything goes wrongint readInto(java.nio.ByteBuffer byteBuffer)
throws java.io.IOException
byteBuffer - destination of the read bytesjava.io.IOException - if anything goes wrongboolean isConnected()