public class TcpInputOutput extends BufferedBinaryInputOutput implements SocketInputOutput
SocketInputOutput.Domain_env, _isEOF, _isTimeout, _lineReaderSEEK_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, writeToStreamappendTo, close, closeRead, closeWrite, flush, getEnv, getInputStream, getOutputStream, getResourceType, init, isEOF, isTimeout, openCopy, print, print, read, read, readOptionalLinefeed, seek, toJavaObjectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitappendTo, close, closeRead, getAvailable, getInputStream, getPosition, openCopy, read, read, read, readLine, readOptionalLinefeed, setPosition, unreadclose, closeWrite, flush, getOutputStream, print, printisEOF, seek, statpublic TcpInputOutput(Env env, java.lang.String host, int port, boolean isSecure, SocketInputOutput.Domain domain) throws java.io.IOException
java.io.IOExceptionpublic TcpInputOutput(Env env, java.net.Socket socket, SocketInputOutput.Domain domain)
public void bind(java.net.SocketAddress address)
throws java.io.IOException
bind in interface SocketInputOutputjava.io.IOExceptionpublic void connect(java.net.SocketAddress address)
throws java.io.IOException
connect in interface SocketInputOutputjava.io.IOExceptionpublic void setError(int errno)
setError in interface SocketInputOutputpublic int getError()
public boolean isConnected()
isConnected in interface SocketInputOutputpublic void init()
init in interface SocketInputOutputpublic void setTimeout(long timeout)
setTimeout in interface SocketInputOutputsetTimeout in class AbstractBinaryInputOutputpublic void write(int ch)
throws java.io.IOException
write in class AbstractBinaryInputOutputjava.io.IOExceptionpublic void write(byte[] buffer,
int offset,
int length)
throws java.io.IOException
BinaryOutputwrite in interface BinaryOutputwrite in class AbstractBinaryInputOutputjava.io.IOExceptionpublic int write(java.io.InputStream is,
int length)
throws java.io.IOException
write in interface BinaryOutputwrite in class AbstractBinaryInputOutputjava.io.IOExceptionpublic void cleanup()
cleanup in interface EnvCleanuppublic java.lang.String toString()
BufferedBinaryInputOutputtoString in class BufferedBinaryInputOutput