Secure iNet Factory

com.jscape.inet.sftp
Class PacketWriter

java.lang.Object
  extended by com.jscape.inet.sftp.PacketWriter

public final class PacketWriter
extends java.lang.Object

Writes the SFTP packets to the output stream.

Version:
1.0
Author:
Alex Usun

Constructor Summary
PacketWriter(java.io.OutputStream out)
          Creates a new writer instnce.
 
Method Summary
 void close()
          Closes the current reader and releases all associated resources.
 boolean isClosed()
          Checks if the current reader is closed.
 void writePacket(SftpPacket packet, java.lang.String charset)
          Writes the packet to the stream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PacketWriter

public PacketWriter(java.io.OutputStream out)
Creates a new writer instnce.

Parameters:
out - the base output stream
Method Detail

close

public void close()
Closes the current reader and releases all associated resources.


isClosed

public boolean isClosed()
Checks if the current reader is closed.

Returns:
true if the reader is closed; false otherwise

writePacket

public void writePacket(SftpPacket packet,
                        java.lang.String charset)
                 throws SftpException
Writes the packet to the stream.

Parameters:
packet - packet to write
Throws:
SftpException - if I/O error occurs

Secure iNet Factory

Copyright © JSCAPE LLC. 1999-2011. All Rights Reserved