public class HttpTunnel extends Object
HttpConnection
Modifier | Constructor and Description |
---|---|
protected |
HttpTunnel()
Constructor.
|
|
HttpTunnel(Socket socket,
InputStream in,
OutputStream out)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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) |
protected HttpTunnel()
public HttpTunnel(Socket socket, InputStream in, OutputStream out) throws IOException
socket
- The tunnel socket.in
- Alternative input stream or null if using normal socket streamout
- Alternative output stream or null if using normal socket streamIOException
public void handle(InputStream in, OutputStream out)
in
- out
- public static int copyBytes(InputStream in, OutputStream out, long byteCount) throws IOException
IOException
public Socket getSocket()
public int getTimeoutMs()
public void setTimeoutMs(int timeoutMs)
timeoutMs
- The timeoutMs to set.Copyright © 2013. All rights reserved.