com.caucho.quercus.lib.file
Class TcpInputOutput
java.lang.Object
com.caucho.quercus.lib.file.AbstractBinaryInputOutput
com.caucho.quercus.lib.file.BufferedBinaryInputOutput
com.caucho.quercus.lib.file.TcpInputOutput
- All Implemented Interfaces:
- EnvCleanup, BinaryInput, BinaryOutput, BinaryStream, SocketInputOutput
public class TcpInputOutput
- extends BufferedBinaryInputOutput
- implements SocketInputOutput
Represents read/write stream
Method Summary |
void |
bind(java.net.SocketAddress address)
|
void |
cleanup()
Implements the EnvCleanup interface. |
void |
connect(java.net.SocketAddress address)
|
int |
getError()
|
void |
init()
|
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)
|
Methods inherited from class com.caucho.quercus.lib.file.BufferedBinaryInputOutput |
getAvailable, getPosition, init, read, read, readLine, setEncoding, setPosition, stat, unread, writeToStream |
Methods inherited from class com.caucho.quercus.lib.file.AbstractBinaryInputOutput |
appendTo, close, closeRead, closeWrite, flush, getEnv, getInputStream, getOutputStream, getResourceType, init, isEOF, isTimeout, openCopy, print, print, read, read, readOptionalLinefeed, seek, toJavaObject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.caucho.quercus.lib.file.BinaryInput |
appendTo, close, closeRead, getAvailable, getInputStream, getPosition, openCopy, read, read, read, readLine, readOptionalLinefeed, setPosition, unread |
TcpInputOutput
public TcpInputOutput(Env env,
java.lang.String host,
int port,
boolean isSecure,
SocketInputOutput.Domain domain)
throws java.io.IOException
- Throws:
java.io.IOException
TcpInputOutput
public TcpInputOutput(Env env,
java.net.Socket socket,
SocketInputOutput.Domain domain)
bind
public void bind(java.net.SocketAddress address)
throws java.io.IOException
- Specified by:
bind
in interface SocketInputOutput
- Throws:
java.io.IOException
connect
public void connect(java.net.SocketAddress address)
throws java.io.IOException
- Specified by:
connect
in interface SocketInputOutput
- Throws:
java.io.IOException
setError
public void setError(int errno)
- Specified by:
setError
in interface SocketInputOutput
getError
public int getError()
init
public void init()
- Specified by:
init
in interface SocketInputOutput
setTimeout
public void setTimeout(long timeout)
- Specified by:
setTimeout
in interface SocketInputOutput
- Overrides:
setTimeout
in class AbstractBinaryInputOutput
write
public void write(int ch)
throws java.io.IOException
- Overrides:
write
in class AbstractBinaryInputOutput
- Throws:
java.io.IOException
write
public void write(byte[] buffer,
int offset,
int length)
throws java.io.IOException
- Description copied from interface:
BinaryOutput
- Writes a buffer.
- Specified by:
write
in interface BinaryOutput
- Overrides:
write
in class AbstractBinaryInputOutput
- Throws:
java.io.IOException
write
public int write(java.io.InputStream is,
int length)
throws java.io.IOException
- Read length bytes of data from the InputStream
argument and write them to this output stream.
- Specified by:
write
in interface BinaryOutput
- Overrides:
write
in class AbstractBinaryInputOutput
- Throws:
java.io.IOException
cleanup
public void cleanup()
- Implements the EnvCleanup interface.
- Specified by:
cleanup
in interface EnvCleanup
toString
public java.lang.String toString()
- Description copied from class:
BufferedBinaryInputOutput
- Converts to a string.
- Overrides:
toString
in class BufferedBinaryInputOutput