public class JabbixReader
extends java.lang.Object
Constructor and Description |
---|
JabbixReader(java.io.InputStream in)
Creates a reader for the given input stream.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
readAll()
Reads the whole available data to the end of the stream.
|
java.lang.String |
readMessage()
Reads a message from the input stream.
|
java.lang.String |
readMessage(boolean untilEOF)
Reads a message from the input stream.
|
public JabbixReader(java.io.InputStream in)
in
- the stream to read frompublic java.lang.String readMessage(boolean untilEOF) throws java.io.IOException, JabbixProtocolException
JabbixProtocol.isSeparator(char)
). If the untilEOF
flag
is passed, then the whole data to the end of the stream is read and
returned as one message.untilEOF
- the flag telling to read to whole available datajava.io.IOException
- if an I/O exception occurred during the read operationJabbixProtocolException
- if the protocol was violated (i.e. an unexpected value was
received)JabbixProtocol.HEADER
public java.lang.String readMessage() throws java.io.IOException, JabbixProtocolException
JabbixProtocol.isSeparator(char)
).java.io.IOException
- if an I/O exception occurred during the read operationJabbixProtocolException
- if the protocol was violated (i.e. an unexpected value was
received)readMessage(boolean)
public java.lang.String readAll() throws java.io.IOException, JabbixProtocolException
java.io.IOException
- if an I/O exception occurred during the read operationJabbixProtocolException
- if the protocol was violated (i.e. an unexpected value was
received)readMessage(boolean)