Ganymed SSH-2 for Java

ch.ethz.ssh2
Class LocalStreamForwarder

java.lang.Object
  extended bych.ethz.ssh2.LocalStreamForwarder

public class LocalStreamForwarder
extends java.lang.Object

A 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).

Version:
$Id: LocalStreamForwarder.java,v 1.6 2006/02/14 19:43:16 cplattne Exp $
Author:
Christian Plattner, plattner@inf.ethz.ch

Method Summary
 void close()
          Close the underlying SSH forwarding channel and free up resources.
 java.io.InputStream getInputStream()
           
 java.io.OutputStream getOutputStream()
          Get the OutputStream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Returns:
An InputStream object.
Throws:
java.io.IOException

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Get the OutputStream. Please be aware that the implementation MAY use an internal buffer. To make sure that the buffered data is sent over the tunnel, you have to call the flush method of the OutputStream. To signal EOF, please use the close method of the OutputStream.

Returns:
An OutputStream object.
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Close the underlying SSH forwarding channel and free up resources. You can also use this method to force the shutdown of the underlying forwarding channel. Pending output (OutputStream not flushed) will NOT be sent. Pending input (InputStream) can still be read. If the shutdown operation is already in progress (initiated from either side), then this call is a no-op.

Throws:
java.io.IOException

Ganymed SSH-2 for Java

!!! Dieses Dokument stammt aus dem ETH Web-Archiv und wird nicht mehr gepflegt !!!
!!! This document is stored in the ETH Web archive and is no longer maintained !!!