final class InputReader[Config <: Config] extends AnyRef
Stateful, mutable abstraction for reading a stream of CBOR or JSON data from the given input
.
- Alphabetic
- By Inheritance
- InputReader
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply[T](implicit arg0: Decoder[T]): T
- Annotations
- @inline()
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def bufferUnsizedBytes[Bytes]()(implicit byteAccess: ByteAccess[Bytes]): InputReader.this.type
-
def
bufferUnsizedTextBytes[Bytes]()(implicit byteAccess: ByteAccess[Bytes]): InputReader.this.type
If the current data item is an unsized Text item it'll be buffered and converted into a sized text item.
-
def
charsCompare(value: Array[Char]): Int
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 '==' tovalue
- a positive value if the next data item is a string that compares as '>' tovalue
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 '==' tovalue
- a positive value if the next data item is a string that compares as '>' tovalue
NOTE: This method causes text bytes (sized or unsized) to be buffered and converted to Chars data items!
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
def
cursor: Long
- Annotations
- @inline()
-
def
dataItem(): Int
- Annotations
- @inline()
-
def
decodeTextBytes(): InputReader.this.type
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.
- Annotations
- @tailrec()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
has(item: Int): Boolean
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)
- Annotations
- @inline()
-
def
hasAnyOf(mask: Int): Boolean
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)
- Annotations
- @inline()
-
def
hasArrayHeader(length: Long): Boolean
- Annotations
- @inline()
-
def
hasArrayHeader(length: Int): Boolean
- Annotations
- @inline()
-
def
hasArrayHeader: Boolean
- Annotations
- @inline()
-
def
hasArrayStart: Boolean
- Annotations
- @inline()
-
def
hasBoolean(value: Boolean): Boolean
- Annotations
- @inline()
-
def
hasBoolean: Boolean
- Annotations
- @inline()
-
def
hasBreak: Boolean
- Annotations
- @inline()
-
def
hasByte(value: Byte): Boolean
- Annotations
- @inline()
-
def
hasByte: Boolean
- Annotations
- @inline()
-
def
hasByteArray: Boolean
- Annotations
- @inline()
-
def
hasBytes: Boolean
- Annotations
- @inline()
-
def
hasBytesStart: Boolean
- Annotations
- @inline()
-
def
hasChar(value: Char): Boolean
- Annotations
- @inline()
-
def
hasChar: Boolean
- Annotations
- @inline()
-
def
hasChars(value: Array[Char]): Boolean
Tests the next data item for equality with the given
Array[Char]
.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!- Annotations
- @inline()
-
def
hasChars: Boolean
- Annotations
- @inline()
-
def
hasDouble(value: Double): Boolean
- Annotations
- @inline()
-
def
hasDouble: Boolean
- Annotations
- @inline()
-
def
hasEndOfInput: Boolean
- Annotations
- @inline()
-
def
hasFloat(value: Float): Boolean
- Annotations
- @inline()
-
def
hasFloat: Boolean
- Annotations
- @inline()
-
def
hasFloat16(value: Float): Boolean
- Annotations
- @inline()
-
def
hasFloat16: Boolean
- Annotations
- @inline()
-
def
hasInt(value: Int): Boolean
- Annotations
- @inline()
-
def
hasInt: Boolean
- Annotations
- @inline()
-
def
hasLong(value: Long): Boolean
- Annotations
- @inline()
-
def
hasLong: Boolean
- Annotations
- @inline()
-
def
hasMapHeader(length: Long): Boolean
- Annotations
- @inline()
-
def
hasMapHeader(length: Int): Boolean
- Annotations
- @inline()
-
def
hasMapHeader: Boolean
- Annotations
- @inline()
-
def
hasMapStart: Boolean
- Annotations
- @inline()
-
def
hasNull: Boolean
- Annotations
- @inline()
-
def
hasNumberString(value: String): Boolean
- Annotations
- @inline()
-
def
hasNumberString: Boolean
- Annotations
- @inline()
-
def
hasOverLong(value: Long): Boolean
- Annotations
- @inline()
-
def
hasOverLong: Boolean
- Annotations
- @inline()
-
def
hasShort(value: Short): Boolean
- Annotations
- @inline()
-
def
hasShort: Boolean
- Annotations
- @inline()
-
def
hasSimpleValue(value: Int): Boolean
- Annotations
- @inline()
-
def
hasSimpleValue: Boolean
- Annotations
- @inline()
-
def
hasSizedBytes: Boolean
- Annotations
- @inline()
-
def
hasSizedTextBytes: Boolean
- Annotations
- @inline()
-
def
hasString(value: String): Boolean
Tests the next data item for equality with the given String.
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!
- Annotations
- @inline()
-
def
hasString: Boolean
- Annotations
- @inline()
-
def
hasTag(tag: Tag): Boolean
- Annotations
- @inline()
-
def
hasTag: Boolean
- Annotations
- @inline()
-
def
hasTextBytes: Boolean
- Annotations
- @inline()
-
def
hasTextStart: Boolean
- Annotations
- @inline()
-
def
hasUndefined: Boolean
- Annotations
- @inline()
-
def
hasUnsizedBytes: Boolean
- Annotations
- @inline()
-
def
hasUnsizedTextBytes: Boolean
- Annotations
- @inline()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
input: Input[_]
- Annotations
- @inline()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
longCompare(value: Long): Int
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
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
overLongNegative: Boolean
- Annotations
- @inline()
-
def
overflow(msg: String): Nothing
- Annotations
- @inline()
-
def
position: Position
- Annotations
- @inline()
-
def
read[T]()(implicit decoder: Decoder[T]): T
- Annotations
- @inline()
-
def
readArrayClose[T](unbounded: Boolean, value: T): T
- Annotations
- @inline()
-
def
readArrayHeader(length: Long): InputReader.this.type
- Annotations
- @inline()
-
def
readArrayHeader(length: Int): InputReader.this.type
- Annotations
- @inline()
- def readArrayHeader(): Long
-
def
readArrayOpen(arity: Long): Boolean
- Annotations
- @inline()
- def readArrayStart(): InputReader.this.type
- def readBoolean(): Boolean
- def readBreak(): InputReader.this.type
- def readByte(): Byte
- def readByteArray(): Array[Byte]
- def readBytes[Bytes]()(implicit arg0: ByteAccess[Bytes]): Bytes
- def readBytesStart(): InputReader.this.type
- def readChar(): Char
- def readChars(chars: Array[Char]): InputReader.this.type
- def readChars(): Array[Char]
- def readDouble(): Double
-
def
readEndOfInput(): Unit
- Annotations
- @inline()
- def readFloat(): Float
- def readFloat16(): Float
- def readInt(): Int
- def readLong(): Long
-
def
readMapClose[T](unbounded: Boolean, value: T): T
- Annotations
- @inline()
-
def
readMapHeader(length: Long): InputReader.this.type
- Annotations
- @inline()
-
def
readMapHeader(length: Int): InputReader.this.type
- Annotations
- @inline()
- def readMapHeader(): Long
-
def
readMapOpen(arity: Long): Boolean
- Annotations
- @inline()
- def readMapStart(): InputReader.this.type
- def readNull(): Null
- def readNumberString(): String
- def readOverLong(): Long
- def readShort(): Short
-
def
readSimpleValue(value: Int): InputReader.this.type
- Annotations
- @inline()
- def readSimpleValue(): Int
- def readSizedBytes[Bytes]()(implicit byteAccess: ByteAccess[Bytes]): Bytes
- def readSizedTextBytes[Bytes]()(implicit byteAccess: ByteAccess[Bytes]): Bytes
- def readString(s: String): InputReader.this.type
- def readString(): String
-
def
readTag(tag: Tag): InputReader.this.type
- Annotations
- @inline()
- def readTag(): Tag
- def readTextBytes[Bytes]()(implicit arg0: ByteAccess[Bytes]): Bytes
- def readTextStart(): InputReader.this.type
- def readUndefined(): InputReader.this.type
- def readUnsizedBytes[Bytes]()(implicit byteAccess: ByteAccess[Bytes]): Bytes
- def readUnsizedTextBytes[Bytes]()(implicit byteAccess: ByteAccess[Bytes]): Bytes
- def readUntilBreak[T](zero: T)(f: (T) ⇒ T): T
- def readUntilBreak[M[_], T]()(implicit arg0: Decoder[T], factory: scala.collection.compat.Factory[T, M[T]]): M[T]
-
def
readingCbor: Boolean
- Annotations
- @inline()
-
def
readingJson: Boolean
- Annotations
- @inline()
-
def
skipDataItem(): InputReader.this.type
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! -
def
skipElement(): InputReader.this.type
Moves the cursor beyond the current data element, thereby also skipping complex, potentially nested array or map structures.
-
def
skipTwoElements(): InputReader.this.type
- Annotations
- @inline()
-
def
stringCompare(value: String): Int
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 '==' tovalue
- a positive value if the next data item is a string that compares as '>' tovalue
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 '==' tovalue
- a positive value if the next data item is a string that compares as '>' tovalue
NOTE: This method causes text bytes (sized or unsized) to be buffered and converted to Chars data items!
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- val target: Target
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
tryReadArrayHeader(length: Long): Boolean
- Annotations
- @inline()
-
def
tryReadArrayHeader(length: Int): Boolean
- Annotations
- @inline()
-
def
tryReadArrayStart(): Boolean
- Annotations
- @inline()
-
def
tryReadBoolean(value: Boolean): Boolean
- Annotations
- @inline()
-
def
tryReadBreak(): Boolean
- Annotations
- @inline()
-
def
tryReadByte(value: Byte): Boolean
- Annotations
- @inline()
-
def
tryReadBytesStart(): Boolean
- Annotations
- @inline()
-
def
tryReadChar(value: Char): Boolean
- Annotations
- @inline()
-
def
tryReadChars(value: Array[Char]): Boolean
Tests the next data item for equality with the given
Array[Char]
and advances the cursor if so.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!- Annotations
- @inline()
-
def
tryReadCharsCompare(value: Array[Char]): Int
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 '==' tovalue
- a positive value if the next data item is a string that compares as '>' tovalue
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 '==' tovalue
- a positive value if the next data item is a string that compares as '>' tovalue
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!
-
def
tryReadDouble(value: Double): Boolean
- Annotations
- @inline()
-
def
tryReadEndOfInput(): Boolean
- Annotations
- @inline()
-
def
tryReadFloat(value: Float): Boolean
- Annotations
- @inline()
-
def
tryReadFloat16(value: Float): Boolean
- Annotations
- @inline()
-
def
tryReadInt(value: Int): Boolean
- Annotations
- @inline()
-
def
tryReadLong(value: Long): Boolean
- Annotations
- @inline()
- def tryReadLongCompare(value: Long): Int
-
def
tryReadMapHeader(length: Long): Boolean
- Annotations
- @inline()
-
def
tryReadMapHeader(length: Int): Boolean
- Annotations
- @inline()
-
def
tryReadMapStart(): Boolean
- Annotations
- @inline()
-
def
tryReadNull(): Boolean
- Annotations
- @inline()
-
def
tryReadNumberString(value: String): Boolean
- Annotations
- @inline()
-
def
tryReadOverLong(value: Long): Boolean
- Annotations
- @inline()
-
def
tryReadShort(value: Short): Boolean
- Annotations
- @inline()
-
def
tryReadSimpleValue(value: Int): Boolean
- Annotations
- @inline()
-
def
tryReadString(value: String): Boolean
Tests the next data item for equality with the given String and advances the cursor if so.
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!
- Annotations
- @inline()
-
def
tryReadStringCompare(value: String): Int
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 '==' tovalue
- a positive value if the next data item is a string that compares as '>' tovalue
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 '==' tovalue
- a positive value if the next data item is a string that compares as '>' tovalue
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!
-
def
tryReadTag(tag: Tag): Boolean
- Annotations
- @inline()
-
def
tryReadTextStart(): Boolean
- Annotations
- @inline()
-
def
tryReadUndefined(): Boolean
- Annotations
- @inline()
-
def
unexpectedDataItem(expected: String, actual: String): Nothing
- Annotations
- @inline()
- def unexpectedDataItem(expected: String): Nothing
-
def
validationFailure(msg: String): Nothing
- Annotations
- @inline()
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated