com.softwareag.sagd.PMQServer
Class ConversationOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by com.softwareag.sagd.PMQServer.ConversationOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class ConversationOutputStream
extends java.io.OutputStream

Writes the output stream to one conversation.

Version:
$Revision: 1.3 $

Constructor Summary
ConversationOutputStream(com.softwareag.entirex.aci.BrokerService service)
          Creates a new conversation for this stream.
 
Method Summary
 void close()
          flush() the stream and close the current conversation.
 void flush()
          Writes all buffered characters to conversation.
 long getLength()
          Returns the number of written characters.
static void main(java.lang.String[] args)
           
 void write(byte[] b)
          Writes character array b.
 void write(byte[] b, int off, int len)
          Writes character array b.
 void write(int b)
          Writes one character b.
 void writeFrom(java.io.InputStream input)
          Write stream from input in to this stream This stream will not close.
 void writeFromLFtoMessage(java.io.InputStream input)
          Write the input stream to this output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConversationOutputStream

public ConversationOutputStream(com.softwareag.entirex.aci.BrokerService service)
Creates a new conversation for this stream. The conversation is created on BrokerService service.

Method Detail

write

public void write(int b)
           throws java.io.IOException
Writes one character b.

Specified by:
write in class java.io.OutputStream
Throws:
java.io.IOException

write

public void write(byte[] b)
           throws java.io.IOException
Writes character array b.

Overrides:
write in class java.io.OutputStream
Throws:
java.io.IOException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws java.io.IOException
Writes character array b.

Overrides:
write in class java.io.OutputStream
Throws:
java.io.IOException

getLength

public long getLength()
Returns the number of written characters.


close

public void close()
           throws java.io.IOException
flush() the stream and close the current conversation.

Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.OutputStream
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Writes all buffered characters to conversation.

Specified by:
flush in interface java.io.Flushable
Overrides:
flush in class java.io.OutputStream
Throws:
java.io.IOException

writeFrom

public void writeFrom(java.io.InputStream input)
               throws java.io.IOException
Write stream from input in to this stream This stream will not close.

Parameters:
input - copy this stream
Throws:
java.io.IOException

writeFromLFtoMessage

public void writeFromLFtoMessage(java.io.InputStream input)
                          throws java.io.IOException
Write the input stream to this output stream. LF flushs the current output and creates new message line.

Throws:
java.io.IOException

main

public static void main(java.lang.String[] args)


Copyright © 2004-2008 Software AG. All Rights Reserved.