public class HttpTunnel
extends java.lang.Object
HttpConnection| Modifier | Constructor and Description |
|---|---|
protected |
HttpTunnel()
Constructor.
|
|
HttpTunnel(java.net.Socket socket,
java.io.InputStream in,
java.io.OutputStream out)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static int |
copyBytes(java.io.InputStream in,
java.io.OutputStream out,
long byteCount)
Copy Stream in to Stream for byteCount bytes or until EOF or exception.
|
java.net.Socket |
getSocket() |
int |
getTimeoutMs() |
void |
handle(java.io.InputStream in,
java.io.OutputStream out)
handle method.
|
void |
setTimeoutMs(int timeoutMs) |
protected HttpTunnel()
public HttpTunnel(java.net.Socket socket,
java.io.InputStream in,
java.io.OutputStream out)
throws java.io.IOException
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 streamout - Alternative output stream or null if using normal socket streamtimeoutMs - java.io.IOExceptionpublic void handle(java.io.InputStream in,
java.io.OutputStream out)
in - out - public static int copyBytes(java.io.InputStream in,
java.io.OutputStream out,
long byteCount)
throws java.io.IOException
java.io.IOExceptionpublic java.net.Socket getSocket()
public int getTimeoutMs()
public void setTimeoutMs(int timeoutMs)
timeoutMs - The timeoutMs to set.Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.