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, writeBytes
public 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
UnknownHostException
IOException
public Socket4D(java.lang.String host, int port, int timeout) throws UnknownHostException, IOException
UnknownHostException
IOException
public Socket4D(java.lang.String host, int port, int timeout, boolean noLinger) throws UnknownHostException, IOException
UnknownHostException
IOException
public Socket4D(java.lang.String host, int port, int timeout, java.lang.String params) throws UnknownHostException, IOException
UnknownHostException
IOException
public void close() throws IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
IOException
- If an I/O error occurs.public int readBytes(byte[] buf, int start, int count) throws IOException
Stream
readBytes
in class Stream
buf
- the byte array to read data intostart
- the start position in the arraycount
- the number of bytes to readIOException
public int readBytes(byte[] buf) throws IOException
IOException
public int writeBytes(byte[] buf, int start, int count) throws IOException
Stream
IOException
if an error prevented the write
operation from occurring.writeBytes
in class Stream
buf
- the byte array to write data fromstart
- the start position in the byte arraycount
- the number of bytes to writeIOException
public java.lang.String readLine() throws IOException
IOException
protected void finalize()
finalize
in class java.lang.Object
public java.lang.String getHost()
public int getPort()