| Constructor and Description |
|---|
LLPInputStream(InputStream input,
Charset charset,
int maxLength)
Constructor.
|
LLPInputStream(InputStream input,
int maxLength)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the underlying stream.
|
HL7Message |
readMessage()
Read next message from the underlying stream.
|
void |
skip()
Advance past the end of the current message.
|
public LLPInputStream(InputStream input, int maxLength)
Equivalent to: LLPInputStream(InputStream, Charset, int)(input, StandardCharsets.ISO_8859_1, maxLength).
input - underlying input streammaxLength - maximum allowed message lengthIllegalArgumentException - if input is nullIllegalArgumentException - if maxLength is negativepublic LLPInputStream(InputStream input, Charset charset, int maxLength)
input - underlying input streammaxLength - maximum allowed message lengthcharset - character encoding for messagesIllegalArgumentException - if any parameter is nullIllegalArgumentException - if maxLength is negativepublic HL7Message readMessage() throws IOException, HL7ContentException
readMessage in interface HL7ReaderEOFException - if there is no more inputHL7ContentException - if a malformed message is readLLPException - if illegal framing byte(s) are read from the underlying stream, or the message is too longIOException - if an error occurs on the underlying streampublic void skip()
throws IOException
LLPException in an attempt to salvage the connection.
This method just reads until the next occurrence of a LLPConstants.TRAILING_BYTE_0 byte
followed immediately by a LLPConstants.TRAILING_BYTE_1 byte, then returns.
EOFException - if there is no more inputIOException - if an error occurs on the underlying streampublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2018. All rights reserved.