com.softwareag.sagd.PMQServer
Class ConversationInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by com.softwareag.sagd.PMQServer.ConversationInputStream
All Implemented Interfaces:
java.io.Closeable

public class ConversationInputStream
extends java.io.InputStream

Reads all messages from a conversation into input stream.

Version:
$Revision: 1.2 $

Constructor Summary
ConversationInputStream(com.softwareag.entirex.aci.BrokerService service)
          Create a new conversation for this stream.
ConversationInputStream(com.softwareag.entirex.aci.Conversation conversation)
          Reads the input stream from this conversation.
 
Method Summary
 void close()
          Close the conversation.
static void main(java.lang.String[] args)
          Test function to read a conversation into given output stream.
 int read()
          Read a character from this stream.
 byte[] readLine()
          Read and return one message line.
 void readTo(java.io.OutputStream outputStream)
          Read the complete conversation with all messages into the output stream.
 
Methods inherited from class java.io.InputStream
available, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConversationInputStream

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


ConversationInputStream

public ConversationInputStream(com.softwareag.entirex.aci.Conversation conversation)
Reads the input stream from this conversation.

Method Detail

read

public int read()
         throws java.io.IOException
Read a character from this stream.

Specified by:
read in class java.io.InputStream
Throws:
java.io.IOException

readLine

public byte[] readLine()
                throws java.io.IOException
Read and return one message line.

Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Close the conversation.

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

readTo

public void readTo(java.io.OutputStream outputStream)
            throws java.io.IOException
Read the complete conversation with all messages into the output stream. After reading, close() the conversation.

Throws:
java.io.IOException

main

public static void main(java.lang.String[] args)
                 throws java.lang.Throwable
Test function to read a conversation into given output stream.

Parameters:
args -
Throws:
java.lang.Throwable


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