public class TcpInputOutput extends BufferedBinaryInputOutput implements SocketInputOutput
SocketInputOutput.Domain
_env, _isEOF, _isTimeout, _lineReader
SEEK_CUR, SEEK_END, SEEK_SET
Constructor and Description |
---|
TcpInputOutput(Env env,
java.net.Socket socket,
SocketInputOutput.Domain domain) |
TcpInputOutput(Env env,
java.lang.String host,
int port,
boolean isSecure,
SocketInputOutput.Domain domain) |
Modifier and Type | Method and Description |
---|---|
void |
bind(java.net.SocketAddress address) |
void |
cleanup()
Implements the EnvCleanup interface.
|
void |
connect(java.net.SocketAddress address) |
int |
getError() |
void |
init() |
boolean |
isConnected() |
void |
setError(int errno) |
void |
setTimeout(long timeout) |
java.lang.String |
toString()
Converts to a string.
|
void |
write(byte[] buffer,
int offset,
int length)
Writes a buffer.
|
int |
write(java.io.InputStream is,
int length)
Read length bytes of data from the InputStream
argument and write them to this output stream.
|
void |
write(int ch) |
getAvailable, getPosition, init, read, read, readLine, setEncoding, setPosition, stat, unread, writeToStream
appendTo, close, closeRead, closeWrite, flush, getEnv, getInputStream, getOutputStream, getResourceType, init, isEOF, isTimeout, openCopy, print, print, read, read, readOptionalLinefeed, seek, toJavaObject
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
appendTo, close, closeRead, getAvailable, getInputStream, getPosition, openCopy, read, read, read, readLine, readOptionalLinefeed, setPosition, unread
close, closeWrite, flush, getOutputStream, print, print
isEOF, seek, stat
public TcpInputOutput(Env env, java.lang.String host, int port, boolean isSecure, SocketInputOutput.Domain domain) throws java.io.IOException
java.io.IOException
public TcpInputOutput(Env env, java.net.Socket socket, SocketInputOutput.Domain domain)
public void bind(java.net.SocketAddress address) throws java.io.IOException
bind
in interface SocketInputOutput
java.io.IOException
public void connect(java.net.SocketAddress address) throws java.io.IOException
connect
in interface SocketInputOutput
java.io.IOException
public void setError(int errno)
setError
in interface SocketInputOutput
public int getError()
public boolean isConnected()
isConnected
in interface SocketInputOutput
public void init()
init
in interface SocketInputOutput
public void setTimeout(long timeout)
setTimeout
in interface SocketInputOutput
setTimeout
in class AbstractBinaryInputOutput
public void write(int ch) throws java.io.IOException
write
in class AbstractBinaryInputOutput
java.io.IOException
public void write(byte[] buffer, int offset, int length) throws java.io.IOException
BinaryOutput
write
in interface BinaryOutput
write
in class AbstractBinaryInputOutput
java.io.IOException
public int write(java.io.InputStream is, int length) throws java.io.IOException
write
in interface BinaryOutput
write
in class AbstractBinaryInputOutput
java.io.IOException
public void cleanup()
cleanup
in interface EnvCleanup
public java.lang.String toString()
BufferedBinaryInputOutput
toString
in class BufferedBinaryInputOutput