public class MinLowerLayerProtocol extends LowerLayerProtocol
Note:
The MLLP Block is framed by single-byte values. The characters transmitted within the MLLP Block have to be encoded in such a way that the HL7 Content does not conflict with the byte values used for framing. Some multi-byte character encodings (e.g. UTF-16, UTF-32) may result in byte values equal to the MLLP framing characters or byte values lower than 0x1F, resulting in errors. These character encodings are therefore not supported by MLLP. MLLP supports all single-byte character encodings (e.g. iso-8859-x, cp1252) as well as UTF-8 and Shift_JIS. The byte values used by UTF-8 do not conflict with the byte values used for MLLP framing.
HAPI still tries to support UTF-16 and UTF-32 as best as possible. To be able to detect per-message
encoding information in MSH-18 with these encodings, corresponding byte order marks (BOMs) are expected
at the beginning of the message payload (i.e. AFTER the MLLP start byte) to be able to decode the
message in order to read the MSH-18 field. This scheme is also followed when the MinLLPWriter
sends out UTF-16 or UTF-32-encoded MLLP messages unless #setOmitBOM(boolean)
is explicitly
set to true.
In general, it is NOT recommended to use UTF-16 or UTF-32.
MinLLPReader
,
MinLLPWriter
charset
Constructor and Description |
---|
MinLowerLayerProtocol() |
MinLowerLayerProtocol(boolean respectMSH18) |
MinLowerLayerProtocol(boolean respectMSH18,
boolean omitBOM) |
Modifier and Type | Method and Description |
---|---|
HL7Reader |
getReader(InputStream in)
Creates an HL7Reader that implements message reading according to
this protocol.
|
HL7Writer |
getWriter(OutputStream out)
Creates an HL7Writer that implements message writing according to
this protocol.
|
logCharacterReceived, makeLLP, makeLLP, setCharset, setCharset
public MinLowerLayerProtocol()
public MinLowerLayerProtocol(boolean respectMSH18)
public MinLowerLayerProtocol(boolean respectMSH18, boolean omitBOM)
public HL7Reader getReader(InputStream in) throws LLPException
getReader
in class LowerLayerProtocol
LLPException
public HL7Writer getWriter(OutputStream out) throws LLPException
getWriter
in class LowerLayerProtocol
LLPException
Copyright © 2001–2017 University Health Network. All rights reserved.