public class GsonMessageReader extends java.lang.Object implements MessageReader
Constructor and Description |
---|
GsonMessageReader(java.io.InputStream inputStream)
Construct a new GsonMessageReader that will read Messages from the given InputStream.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the underlying stream.
|
Message |
read()
Read a message from the backing InputStream.
|
public GsonMessageReader(java.io.InputStream inputStream)
inputStream
- The InputStream.public Message read() throws java.io.IOException
MessageReader
read
in interface MessageReader
java.io.IOException
- If there is an exception when reading the message.public void close() throws java.io.IOException
MessageReader
close
in interface MessageReader
java.io.IOException
- If there is an exception when closing the underlying stream.