Secure iNet Factory

com.jscape.inet.ssh.transport
Class MessageWriter

java.lang.Object
  extended by com.jscape.inet.ssh.transport.MessageStream
      extended by com.jscape.inet.ssh.transport.MessageWriter

public final class MessageWriter
extends MessageStream

The SSH message out.

Version:
1.0
Author:
Alex Usun

Constructor Summary
MessageWriter(java.io.OutputStream out, Compression compressor, javax.crypto.Cipher encipher, javax.crypto.Mac mac)
          Creates a new SSH message out instance.
 
Method Summary
 void close()
          Closes the writer.
 void writeLine(java.lang.String line)
          Writes the specified line.
 void writeMessage(Message msg)
          Writes the specified message to the underlayed output stream.
 
Methods inherited from class com.jscape.inet.ssh.transport.MessageStream
getBytesCount, setCipher, setCompression, setMac
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageWriter

public MessageWriter(java.io.OutputStream out,
                     Compression compressor,
                     javax.crypto.Cipher encipher,
                     javax.crypto.Mac mac)
Creates a new SSH message out instance.

Parameters:
out - the target output stream
compressor - the message compressor
encipher - the message encipher
mac - the message mac algorithm
Method Detail

close

public void close()
Closes the writer.


writeLine

public void writeLine(java.lang.String line)
               throws java.io.IOException
Writes the specified line.

Parameters:
line - the line to write.
Throws:
java.io.IOException - if an I/O error occurs

writeMessage

public void writeMessage(Message msg)
                  throws java.io.IOException
Writes the specified message to the underlayed output stream.

Parameters:
msg - the message to write
Throws:
java.io.IOException - if an I/O error occurs

Secure iNet Factory

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