InputReader
Stateful, mutable abstraction for reading a stream of CBOR or JSON data from the given input
.
Value members
Concrete methods
If the current data item is an unsized Text item it'll be buffered and converted into a sized text item.
If the current data item is an unsized Text item it'll be buffered and converted into a sized text item.
Returns one of the following 4 values:
Returns one of the following 4 values:
- Int.MinValue if the next data item is not a string
- a negative value (!= Int.MinValue) a if the next data item is a string that compares as '<' to
value
- zero if the next data item is a string that compares as '==' to
value
- a positive value if the next data item is a string that compares as '>' to
value
NOTE: This method causes text bytes (sized or unsized) to be buffered and converted to Chars data items!
If the current data item is a sized or unsized Text item it'll be buffered and decoded into a Chars data item.
If the current data item is a sized or unsized Text item it'll be buffered and decoded into a Chars data item.
Checks whether the next data item is of the given type.
Checks whether the next data item is of the given type.
Example: reader.has(DataItem.Int)
Checks whether the next data item type is masked in the given bit mask.
Checks whether the next data item type is masked in the given bit mask.
Example: reader.hasAnyOf(DataItem.Int | DataItem.Float)
Tests the next data item for equality with the given Array[Char]
.
NOTE: This method causes text bytes (sized or unsized) to be buffered and converted to Chars data items!
Tests the next data item for equality with the given Array[Char]
.
NOTE: This method causes text bytes (sized or unsized) to be buffered and converted to Chars data items!
Tests the next data item for equality with the given String. NOTE: This method causes text bytes (sized or unsized) to be buffered and converted to Chars data items!
Tests the next data item for equality with the given String. NOTE: This method causes text bytes (sized or unsized) to be buffered and converted to Chars data items!
Returns one of the following 4 values:
Returns one of the following 4 values:
- Int.MaxValue if the next data item is not a Long
- minus one a if the next data item is a Long <
value
- zero if the next data item is a Long ==
value
- one if the next data item is a Long >
value
Skips the current (atomic) data item.
Skips the current (atomic) data item.
CAUTION: If the data item is an Array/Map - Start/Header then this call will NOT skip the whole array or map,
but only the starting data item! Use skipElement
instead if you also want to skip complex elements!
Moves the cursor beyond the current data element, thereby also skipping complex, potentially nested array or map structures.
Moves the cursor beyond the current data element, thereby also skipping complex, potentially nested array or map structures.
Returns one of the following 4 values:
Returns one of the following 4 values:
- Int.MinValue if the next data item is not a string
- a negative value (!= Int.MinValue) a if the next data item is a string that compares as '<' to
value
- zero if the next data item is a string that compares as '==' to
value
- a positive value if the next data item is a string that compares as '>' to
value
NOTE: This method causes text bytes (sized or unsized) to be buffered and converted to Chars data items!
Tests the next data item for equality with the given Array[Char]
and advances the cursor if so.
NOTE: This method causes text bytes (sized or unsized) to be buffered and converted to Chars data items!
Tests the next data item for equality with the given Array[Char]
and advances the cursor if so.
NOTE: This method causes text bytes (sized or unsized) to be buffered and converted to Chars data items!
Returns one of the following 4 values:
Returns one of the following 4 values:
- Int.MinValue if the next data item is not a string
- a negative value (!= Int.MinValue) a if the next data item is a string that compares as '<' to
value
- zero if the next data item is a string that compares as '==' to
value
- a positive value if the next data item is a string that compares as '>' to
value
Advanced the cursor if the return value is zero.
NOTE: This method causes text bytes (sized or unsized) to be buffered and converted to Chars data items!
Tests the next data item for equality with the given String and advances the cursor if so. NOTE: This method causes text bytes (sized or unsized) to be buffered and converted to Chars data items!
Tests the next data item for equality with the given String and advances the cursor if so. NOTE: This method causes text bytes (sized or unsized) to be buffered and converted to Chars data items!
Returns one of the following 4 values:
Returns one of the following 4 values:
- Int.MinValue if the next data item is not a string
- a negative value (!= Int.MinValue) a if the next data item is a string that compares as '<' to
value
- zero if the next data item is a string that compares as '==' to
value
- a positive value if the next data item is a string that compares as '>' to
value
Advanced the cursor if the return value is zero.
NOTE: This method causes text bytes (sized or unsized) to be buffered and converted to Chars data items!