Package ca.uhn.hl7v2.llp
Class MinLLPWriter
java.lang.Object
ca.uhn.hl7v2.llp.MinLLPWriter
- All Implemented Interfaces:
HL7Writer
Writes HL7 messages to an OutputStream. The character set defaults to US-ASCII.
It can be changed 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.
- Author:
- Damian Horton; mods by Bryan Tripp, Christian Ohr
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMinLLPWriter(OutputStream out) MinLLPWriter(OutputStream out, Charset charset) MinLLPWriter(OutputStream out, Charset charset, boolean omitBOM) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the underlying stream and any other resources that should be closed.protected Charsetprotected ca.uhn.hl7v2.llp.MllpEncodervoidSets the underlying output stream to which messages are written.voidwriteMessage(String message) Sends a complete message to the underlying output stream, delimited according to the minimal lower layer protocol.voidwriteMessage(String message, String charset) Sends a complete message to the underlying output stream, delimited according to the minimal lower layer protocol, using the specified character set.
-
Field Details
-
omitBOM
protected boolean omitBOM
-
-
Constructor Details
-
MinLLPWriter
public MinLLPWriter() -
MinLLPWriter
- Throws:
IOException
-
MinLLPWriter
- Throws:
IOException
-
MinLLPWriter
- Throws:
IOException
-
-
Method Details
-
initEncoder
-
setOutputStream
Sets the underlying output stream to which messages are written.- Specified by:
setOutputStreamin interfaceHL7Writer
-
writeMessage
Sends a complete message to the underlying output stream, delimited according to the minimal lower layer protocol.- Specified by:
writeMessagein interfaceHL7Writer- Throws:
LLPExceptionIOException
-
writeMessage
Sends a complete message to the underlying output stream, delimited according to the minimal lower layer protocol, using the specified character set.- Throws:
IOException
-
close
Description copied from interface:HL7WriterCloses the underlying stream and any other resources that should be closed.- Specified by:
closein interfaceHL7Writer- Throws:
IOException
-
getCharset
-