org.mortbay.http
public class HttpTunnel extends Object
Version: $Revision: 1.11 $
See Also: HttpConnection
Constructor Summary | |
---|---|
protected | HttpTunnel() Constructor. |
HttpTunnel(Socket socket, InputStream in, OutputStream out) Constructor. |
Method Summary | |
---|---|
static int | copyBytes(InputStream in, OutputStream out, long byteCount) Copy Stream in to Stream for byteCount bytes or until EOF or exception. |
Socket | getSocket() |
int | getTimeoutMs() |
void | handle(InputStream in, OutputStream out) handle method.
|
void | setTimeoutMs(int timeoutMs) |
Parameters: socket The tunnel socket. timeoutMs The maximum time to wait for a read on the tunnel. Note that sotimer exceptions are ignored by the tunnel. in Alternative input stream or null if using normal socket stream out Alternative output stream or null if using normal socket stream timeoutMs
Throws: IOException
Returns: Copied bytes count or -1 if no bytes were read *and* EOF was reached
Returns: Returns the socket.
Returns: Returns the timeoutMs.
Parameters: in out
Parameters: timeoutMs The timeoutMs to set.