ca.uhn.hl7v2.llp
Class MinLLPWriter

java.lang.Object
  extended by ca.uhn.hl7v2.llp.MinLLPWriter
All Implemented Interfaces:
HL7Writer

public class MinLLPWriter
extends java.lang.Object
implements HL7Writer

Title: MinLLPWriter Description: Writes HL7 messages to an OutputStream. The character set defaults to US-ASCII. It can be chaged by setting the system property ca.uhn.hl7v2.llp.charset to another value that is the name of a valid java.nio.charset.Charset. If this property is set to "default", then the system default is used. Copyright: Copyright (c) 2001 Company: University Health Network

Version:
1.1
Author:
Damian Horton; mods by Bryan Tripp

Field Summary
static java.lang.String CHARSET_KEY
           
 
Constructor Summary
MinLLPWriter()
          Creates a MinLLPWriter with no output stream specified - setOutputStream must be called before attempting to write any messages.
MinLLPWriter(java.io.OutputStream out)
          Creates a MinLLPWriter, specifying the underlying output stream.
 
Method Summary
 void close()
          Closes the underlying stream and any other resources that should be closed.
 void setOutputStream(java.io.OutputStream out)
          Sets the underlying output stream to which messages are written.
 void writeMessage(java.lang.String message)
          Sends a complete message to the underlying output stream, delimited according to the minimal lower layer protocol.
 void writeMessage(java.lang.String message, java.lang.String charset)
          Sends a complete message to the underlying output stream, delimited according to the minimal lower layer protocol, using the specified character set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CHARSET_KEY

public static final java.lang.String CHARSET_KEY
See Also:
Constant Field Values
Constructor Detail

MinLLPWriter

public MinLLPWriter()
Creates a MinLLPWriter with no output stream specified - setOutputStream must be called before attempting to write any messages.


MinLLPWriter

public MinLLPWriter(java.io.OutputStream out)
             throws java.io.IOException
Creates a MinLLPWriter, specifying the underlying output stream.

Throws:
java.io.IOException
Method Detail

setOutputStream

public void setOutputStream(java.io.OutputStream out)
                     throws java.io.IOException
Sets the underlying output stream to which messages are written.

Specified by:
setOutputStream in interface HL7Writer
Throws:
java.io.IOException

writeMessage

public void writeMessage(java.lang.String message)
                  throws LLPException,
                         java.io.IOException
Sends a complete message to the underlying output stream, delimited according to the minimal lower layer protocol.

Specified by:
writeMessage in interface HL7Writer
Throws:
LLPException
java.io.IOException

writeMessage

public void writeMessage(java.lang.String message,
                         java.lang.String charset)
                  throws LLPException,
                         java.io.IOException
Sends a complete message to the underlying output stream, delimited according to the minimal lower layer protocol, using the specified character set.

Throws:
LLPException
java.io.IOException

close

public void close()
           throws java.io.IOException
Description copied from interface: HL7Writer
Closes the underlying stream and any other resources that should be closed.

Specified by:
close in interface HL7Writer
Throws:
java.io.IOException


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