org.jboss.errai.marshalling.server
Class JSONStreamDecoder
java.lang.Object
org.jboss.errai.marshalling.server.JSONStreamDecoder
public class JSONStreamDecoder
- extends Object
High-performance stream JSON parser. Provides the decoding algorithm to interpret the Errai Wire Protcol,
including serializable types. This parser always assumes the outer payload is a Map. So it probably shouldn't
be used as a general parser.
- Since:
- 1.1
- Author:
- Mike Brock
Constructor Summary |
JSONStreamDecoder(InputStream inStream)
Decodes the JSON payload by reading from the given stream of UTF-8 encoded
characters. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JSONStreamDecoder
public JSONStreamDecoder(InputStream inStream)
- Decodes the JSON payload by reading from the given stream of UTF-8 encoded
characters. Reads to the end of the input stream unless there are errors,
in which case the current position in the stream will not be at EOF, but
may possibly be beyond the character that caused the error.
- Parameters:
inStream
- The input stream to read from. It must contain character data
encoded as UTF-8, and it must be positioned to read from the start
of the JSON message to be parsed.
decode
public static EJValue decode(InputStream instream)
throws IOException
- Throws:
IOException
read
public char read()
throws IOException
- Throws:
IOException
parse
public EJValue parse()
Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.