public class LocalStreamForwarder
extends java.lang.Object
LocalStreamForwarder
forwards an Input- and Outputstream
pair via the secure tunnel to another host (which may or may not be identical
to the remote SSH-2 server).Modifier and Type | Field and Description |
---|---|
(package private) ChannelManager |
cm |
(package private) Channel |
cn |
(package private) java.lang.String |
host_to_connect |
(package private) LocalAcceptThread |
lat |
(package private) int |
port_to_connect |
Constructor and Description |
---|
LocalStreamForwarder(ChannelManager cm,
java.lang.String host_to_connect,
int port_to_connect) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the underlying SSH forwarding channel and free up resources.
|
java.io.InputStream |
getInputStream() |
java.io.OutputStream |
getOutputStream()
Get the OutputStream.
|
ChannelManager cm
java.lang.String host_to_connect
int port_to_connect
LocalAcceptThread lat
Channel cn
LocalStreamForwarder(ChannelManager cm, java.lang.String host_to_connect, int port_to_connect) throws java.io.IOException
java.io.IOException
public java.io.InputStream getInputStream() throws java.io.IOException
InputStream
object.java.io.IOException
public java.io.OutputStream getOutputStream() throws java.io.IOException
flush
method of the
OutputStream
. To signal EOF, please use the
close
method of the OutputStream
.OutputStream
object.java.io.IOException
public void close() throws java.io.IOException
java.io.IOException