public class Socket4D extends Stream
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_OPEN_TIMEOUT |
static int |
DEFAULT_READ_TIMEOUT |
static int |
DEFAULT_WRITE_TIMEOUT |
int |
readTimeout |
int |
writeTimeout |
skipBuffer| Modifier | Constructor and Description |
|---|---|
protected |
Socket4D() |
|
Socket4D(java.lang.String host,
int port) |
|
Socket4D(java.lang.String host,
int port,
int timeout) |
|
Socket4D(java.lang.String host,
int port,
int timeout,
boolean noLinger) |
|
Socket4D(java.lang.String host,
int port,
int timeout,
java.lang.String params) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this I/O connection, releasing any associated resources.
|
protected void |
finalize() |
java.lang.String |
getHost() |
int |
getPort() |
int |
readBytes(byte[] buf) |
int |
readBytes(byte[] buf,
int start,
int count)
Reads bytes from the stream.
|
java.lang.String |
readLine() |
int |
writeBytes(byte[] buf,
int start,
int count)
Writes bytes to the stream.
|
asInputStream, asOutputStream, asStream, asStream, skipBytes, wrapInputStream, wrapInputStreamToStream, write, writeBytes, writeBytes, writeBytespublic int readTimeout
public int writeTimeout
public static final int DEFAULT_OPEN_TIMEOUT
public static final int DEFAULT_READ_TIMEOUT
public static final int DEFAULT_WRITE_TIMEOUT
protected Socket4D()
public Socket4D(java.lang.String host,
int port)
throws UnknownHostException,
IOException
UnknownHostExceptionIOExceptionpublic Socket4D(java.lang.String host,
int port,
int timeout)
throws UnknownHostException,
IOException
UnknownHostExceptionIOExceptionpublic Socket4D(java.lang.String host,
int port,
int timeout,
boolean noLinger)
throws UnknownHostException,
IOException
UnknownHostExceptionIOExceptionpublic Socket4D(java.lang.String host,
int port,
int timeout,
java.lang.String params)
throws UnknownHostException,
IOException
UnknownHostExceptionIOExceptionpublic void close()
throws IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableIOException - If an I/O error occurs.public int readBytes(byte[] buf,
int start,
int count)
throws IOException
StreamreadBytes in class Streambuf - the byte array to read data intostart - the start position in the arraycount - the number of bytes to readIOExceptionpublic int readBytes(byte[] buf)
throws IOException
IOExceptionpublic int writeBytes(byte[] buf,
int start,
int count)
throws IOException
StreamIOException if an error prevented the write
operation from occurring.writeBytes in class Streambuf - the byte array to write data fromstart - the start position in the byte arraycount - the number of bytes to writeIOExceptionpublic java.lang.String readLine()
throws IOException
IOExceptionprotected void finalize()
finalize in class java.lang.Objectpublic java.lang.String getHost()
public int getPort()