ca.uhn.hl7v2.llp
Class ExtendedMinLLPReader

java.lang.Object
  extended by ca.uhn.hl7v2.llp.ExtendedMinLLPReader
All Implemented Interfaces:
HL7Reader

public class ExtendedMinLLPReader
extends Object
implements HL7Reader

Charset-aware MLLP stream reader

Author:
Jens Kristian Villadsen from Cetrea A/S
See Also:
ExtendedMinLowerLayerProtocol

Constructor Summary
ExtendedMinLLPReader()
          Creates a MinLLPReader with no setup - setInputStream must be set later.
ExtendedMinLLPReader(InputStream in)
          Creates a MinLLPReader which reads from the given InputStream.
 
Method Summary
 void close()
          Closes the underlying BufferedReader.
 Charset getLastCharset()
           
 String getMessage()
          Reads a complete HL7 message from the underlying input stream
 void setInputStream(InputStream in)
          Sets the InputStream from which to read messages.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtendedMinLLPReader

public ExtendedMinLLPReader()
Creates a MinLLPReader with no setup - setInputStream must be set later.


ExtendedMinLLPReader

public ExtendedMinLLPReader(InputStream in)
                     throws IOException
Creates a MinLLPReader which reads from the given InputStream. The stream is assumed to be an ASCII bit stream.

Throws:
IOException
Method Detail

close

public void close()
           throws IOException
Closes the underlying BufferedReader.

Specified by:
close in interface HL7Reader
Throws:
IOException

getLastCharset

public Charset getLastCharset()
Returns:
the lastCharset

getMessage

public String getMessage()
                  throws LLPException,
                         IOException
Description copied from interface: HL7Reader
Reads a complete HL7 message from the underlying input stream

Specified by:
getMessage in interface HL7Reader
Throws:
LLPException
IOException

setInputStream

public void setInputStream(InputStream in)
                    throws IOException
Sets the InputStream from which to read messages. The InputStream must be set before any calls to getMessage().

Specified by:
setInputStream in interface HL7Reader
Throws:
IOException


Copyright © 2001-2012 University Health Network. All Rights Reserved.