Class/Object

quasar.blueeyes.json

AsyncParser

Related Docs: object AsyncParser | package json

Permalink

final class AsyncParser extends ByteBasedParser

Linear Supertypes
ByteBasedParser, Parser, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AsyncParser
  2. ByteBasedParser
  3. Parser
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AsyncParser(state: Int, curr: Int, stack: List[Context], data: Array[Byte], len: Int, allocated: Int, offset: Int, done: Boolean, streamMode: Int)

    Permalink
    Attributes
    protected[quasar.blueeyes.json]

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final val ARRBEG: Int(6)

    Permalink

    Valid parser states.

    Valid parser states.

    Attributes
    protected[this]
    Definition Classes
    Parser
  5. final val ARREND: Int(4)

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Parser
  6. final val DATA: Int(1)

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Parser
  7. final val KEY: Int(2)

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Parser
  8. final val OBJBEG: Int(7)

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Parser
  9. final val OBJEND: Int(5)

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Parser
  10. final val SEP: Int(3)

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Parser
  11. final def absorb(buf: ByteBuffer): Unit

    Permalink
    Attributes
    protected[this]
  12. var allocated: Int

    Permalink
    Attributes
    protected[quasar.blueeyes.json]
  13. final def apply(input: Input): (AsyncParse, AsyncParser)

    Permalink
  14. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  15. final def at(i: Int, k: Int): String

    Permalink

    Access a byte range as a string.

    Access a byte range as a string.

    Since the underlying data are UTF-8 encoded, i and k must occur on unicode boundaries. Also, the resulting String is not guaranteed to have length (k - i).

    Attributes
    protected[this]
    Definition Classes
    AsyncParser → Parser
  16. final def at(i: Int): Char

    Permalink

    Read the byte/char at 'i' as a Char.

    Read the byte/char at 'i' as a Char.

    Note that this should not be used on potential multi-byte sequences.

    Attributes
    protected[this]
    Definition Classes
    AsyncParser → Parser
  17. final def atEof(i: Int): Boolean

    Permalink

    Return true iff 'i' is at or beyond the end of the input (EOF).

    Return true iff 'i' is at or beyond the end of the input (EOF).

    Attributes
    protected[this]
    Definition Classes
    AsyncParser → Parser
  18. final def byte(i: Int): Byte

    Permalink

    This is a specialized accessor for the case where our underlying data are bytes not chars.

    This is a specialized accessor for the case where our underlying data are bytes not chars.

    Attributes
    protected[this]
    Definition Classes
    AsyncParser → ByteBasedParser
  19. final def checkpoint(state: Int, i: Int, stack: List[Context]): Unit

    Permalink

    We use this to keep track of the last recoverable place we've seen.

    We use this to keep track of the last recoverable place we've seen. If we hit an AsyncException, we can later resume from this point.

    This method is called during every loop of rparse, and the arguments are the exact arguments we can pass to rparse to continue where we left off.

    Attributes
    protected[this]
    Definition Classes
    AsyncParser → Parser
  20. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def close(): Unit

    Permalink

    Should be called when parsing is finished.

    Should be called when parsing is finished.

    Attributes
    protected[this]
    Definition Classes
    AsyncParser → Parser
  22. final def column(i: Int): Int

    Permalink
    Attributes
    protected[this]
    Definition Classes
    AsyncParser → Parser
  23. final def copy(): AsyncParser

    Permalink
    Attributes
    protected[this]
  24. var curr: Int

    Permalink
    Attributes
    protected[quasar.blueeyes.json]
  25. var data: Array[Byte]

    Permalink
    Attributes
    protected[quasar.blueeyes.json]
  26. final def descape(s: String): Char

    Permalink

    Generate a Char from the hex digits of "ሴ" (i.e.

    Generate a Char from the hex digits of "ሴ" (i.e. "1234").

    NOTE: This is only capable of generating characters from the basic plane. This is why it can only return Char instead of Int.

    Attributes
    protected[this]
    Definition Classes
    Parser
  27. def die(i: Int, msg: String): Nothing

    Permalink

    Used to generate error messages with character info and byte addresses.

    Used to generate error messages with character info and byte addresses.

    Attributes
    protected[this]
    Definition Classes
    Parser
  28. var done: Boolean

    Permalink
    Attributes
    protected[quasar.blueeyes.json]
  29. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  30. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  31. def error(msg: String): Nothing

    Permalink

    Used to generate messages for internal errors.

    Used to generate messages for internal errors.

    Attributes
    protected[this]
    Definition Classes
    Parser
  32. def feed(b: Input): (AsyncParse, AsyncParser)

    Permalink
    Attributes
    protected[quasar.blueeyes.json]
  33. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  34. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  35. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  36. final def is(i: Int, j: Int, str: String): Boolean

    Permalink

    Return true iff the bytes/chars from 'i' until 'j' are equal to 'str'.

    Return true iff the bytes/chars from 'i' until 'j' are equal to 'str'.

    Attributes
    protected[this]
    Definition Classes
    Parser
  37. final def is(i: Int, c: Char): Boolean

    Permalink

    Return true iff the byte/char at 'i' is equal to 'c'.

    Return true iff the byte/char at 'i' is equal to 'c'.

    Attributes
    protected[this]
    Definition Classes
    Parser
  38. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  39. var len: Int

    Permalink
    Attributes
    protected[quasar.blueeyes.json]
  40. var line: Int

    Permalink
    Attributes
    protected[this]
    Definition Classes
    AsyncParser → Parser
  41. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  42. final def newline(i: Int): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    AsyncParser → Parser
  43. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  44. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  45. var offset: Int

    Permalink
    Attributes
    protected[quasar.blueeyes.json]
  46. final def parse(i: Int): (JValue, Int)

    Permalink

    Parse and return the "next" JSON value as well as the position beyond it.

    Parse and return the "next" JSON value as well as the position beyond it. This method is used by both parse() as well as parseMany().

    Attributes
    protected[this]
    Definition Classes
    Parser
  47. final def parseFalse(i: Int): JFalse

    Permalink

    Parse the JSON constant "false".

    Parse the JSON constant "false".

    Attributes
    protected[this]
    Definition Classes
    Parser
  48. final def parseNull(i: Int): JNull

    Permalink

    Parse the JSON constant "null".

    Parse the JSON constant "null".

    Attributes
    protected[this]
    Definition Classes
    Parser
  49. final def parseNum(i: Int, ctxt: Context): Int

    Permalink

    Parse the given number, and add it to the given context.

    Parse the given number, and add it to the given context.

    We don't actually instantiate a number here, but rather save the string for future use. This ends up being way faster and has the nice side-effect that we know exactly how the user represented the number.

    It would probably be possible to keep track of the whether the number is expected to be whole, decimal, etc. but we don't do that at the moment.

    Attributes
    protected[this]
    Definition Classes
    Parser
  50. final def parseNumSlow(i: Int, ctxt: Context): Int

    Permalink

    This number parser is a bit slower because it has to be sure it doesn't run off the end of the input.

    This number parser is a bit slower because it has to be sure it doesn't run off the end of the input. Normally (when operating in rparse in the context of an outer array or objedct) we don't have to worry about this and can just grab characters, because if we run out of characters that would indicate bad input.

    This method has all the same caveats as the previous method.

    Attributes
    protected[this]
    Definition Classes
    Parser
  51. final def parseString(i: Int, ctxt: Context): Int

    Permalink

    Parse the string according to JSON rules, and add to the given context.

    Parse the string according to JSON rules, and add to the given context.

    This method expects the data to be in UTF-8 and accesses it as bytes.

    Attributes
    protected[this]
    Definition Classes
    ByteBasedParser → Parser
  52. final def parseStringSimple(i: Int, ctxt: Context): Int

    Permalink

    See if the string has any escape sequences.

    See if the string has any escape sequences. If not, return the end of the string. If so, bail out and return -1.

    This method expects the data to be in UTF-8 and accesses it as bytes. Thus we can just ignore any bytes with the highest bit set.

    Attributes
    protected[this]
    Definition Classes
    ByteBasedParser
  53. final def parseTrue(i: Int): JTrue

    Permalink

    Parse the JSON constant "true".

    Parse the JSON constant "true".

    Attributes
    protected[this]
    Definition Classes
    Parser
  54. var pos: Int

    Permalink
    Attributes
    protected[this]
  55. final def reset(i: Int): Int

    Permalink

    The reset() method is used to signal that we're working from the given position, and any previous data can be released.

    The reset() method is used to signal that we're working from the given position, and any previous data can be released. Some parsers (e.g. StringParser) will ignore release, while others (e.g. PathParser) will need to use this information to release and allocate different areas.

    Attributes
    protected[this]
    Definition Classes
    AsyncParser → Parser
  56. final def rparse(state: Int, j: Int, stack: List[Context]): (JValue, Int)

    Permalink

    Tail-recursive parsing method to do the bulk of JSON parsing.

    Tail-recursive parsing method to do the bulk of JSON parsing.

    This single method manages parser states, data, etc. Except for parsing non-recursive values (like strings, numbers, and constants) all important work happens in this loop (or in methods it calls, like reset()).

    Currently the code is optimized to make use of switch statements. Future work should consider whether this is better or worse than manually constructed if/else statements or something else.

    Attributes
    protected[this]
    Definition Classes
    Parser
    Annotations
    @tailrec()
  57. var stack: List[Context]

    Permalink
    Attributes
    protected[quasar.blueeyes.json]
  58. var state: Int

    Permalink
    Attributes
    protected[quasar.blueeyes.json]
  59. var streamMode: Int

    Permalink
    Attributes
    protected[quasar.blueeyes.json]
  60. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  61. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  62. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  63. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  64. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from ByteBasedParser

Inherited from Parser

Inherited from AnyRef

Inherited from Any

Ungrouped