com.sshtools.j2ssh.connection
Class ChannelOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by com.sshtools.j2ssh.connection.ChannelOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class ChannelOutputStream
extends java.io.OutputStream

Version:
$Revision: 1.1 $
Author:
$author$

Field Summary
private  Channel channel
           
private  boolean isClosed
           
private static org.apache.commons.logging.Log log
           
private  java.lang.Integer type
           
 
Constructor Summary
ChannelOutputStream(Channel channel)
          Creates a new ChannelOutputStream object.
ChannelOutputStream(Channel channel, java.lang.Integer type)
          Creates a new ChannelOutputStream object.
 
Method Summary
 void close()
           
 boolean isClosed()
           
private  void sendChannelData(byte[] data)
           
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class java.io.OutputStream
flush, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static org.apache.commons.logging.Log log

channel

private Channel channel

isClosed

private boolean isClosed

type

private java.lang.Integer type
Constructor Detail

ChannelOutputStream

public ChannelOutputStream(Channel channel,
                           java.lang.Integer type)
Creates a new ChannelOutputStream object.

Parameters:
channel -
type -

ChannelOutputStream

public ChannelOutputStream(Channel channel)
Creates a new ChannelOutputStream object.

Parameters:
channel -
Method Detail

isClosed

public boolean isClosed()
Returns:

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.OutputStream
Throws:
java.io.IOException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws java.io.IOException
Overrides:
write in class java.io.OutputStream
Parameters:
b -
off -
len -
Throws:
java.io.IOException

write

public void write(int b)
           throws java.io.IOException
Specified by:
write in class java.io.OutputStream
Parameters:
b -
Throws:
java.io.IOException

sendChannelData

private void sendChannelData(byte[] data)
                      throws java.io.IOException
Throws:
java.io.IOException