trait Input[Bytes] extends AnyRef

Mutable abstraction wrapping some source of bytes to serve as parser input.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Input
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def cursor: Long

    The index of the next byte to be read.

  2. abstract def readByte(): Byte

    Returns the next byte, if possible without any range checks.

    Returns the next byte, if possible without any range checks. Advances the cursor by 1.

  3. abstract def readBytePadded(pp: PaddingProvider[Bytes]): Byte

    Returns the next byte if not out-of-range, otherwise the one returned by the given Input.PaddingProvider.

  4. abstract def readBytes(length: Long, pp: PaddingProvider[Bytes]): Bytes

    Returns the next length bytes as Bytes if the input still has this many bytes available.

    Returns the next length bytes as Bytes if the input still has this many bytes available. Otherwise the given Input.PaddingProvider is called to perform the padding and its result returned.

  5. abstract def readDoubleByteBigEndian(): Char

    Returns the next two bytes as an unsigned 16-bit value, with the first becoming the more-significant byte (i.e.

    Returns the next two bytes as an unsigned 16-bit value, with the first becoming the more-significant byte (i.e. big endian/network byte order), if possible without any range checks. Advances the cursor by 2.

  6. abstract def readDoubleByteBigEndianPadded(pp: PaddingProvider[Bytes]): Char

    Returns the next two bytes as an unsigned 16-bit value, with the first becoming the more-significant byte (i.e.

    Returns the next two bytes as an unsigned 16-bit value, with the first becoming the more-significant byte (i.e. big endian/network byte order). If the input has less than 2 bytes left the given Input.PaddingProvider is called to perform the padding and its result returned.

  7. abstract def readOctaByteBigEndian(): Long

    Returns the eight eight bytes as a Long, with the first becoming the most-significant byte (i.e.

    Returns the eight eight bytes as a Long, with the first becoming the most-significant byte (i.e. big endian/network byte order), if possible without any range checks. Advances the cursor by 8.

  8. abstract def readOctaByteBigEndianPadded(pp: PaddingProvider[Bytes]): Long

    Returns the next eight bytes as a Long, with the first becoming the most-significant byte (i.e.

    Returns the next eight bytes as a Long, with the first becoming the most-significant byte (i.e. big endian/network byte order). If the input has less than 8 bytes left the given Input.PaddingProvider is called to perform the padding and its result returned.

  9. abstract def readQuadByteBigEndian(): Int

    Returns the next four bytes as an Int, with the first becoming the most-significant byte (i.e.

    Returns the next four bytes as an Int, with the first becoming the most-significant byte (i.e. big endian/network byte order), if possible without any range checks. Advances the cursor by 4.

  10. abstract def readQuadByteBigEndianPadded(pp: PaddingProvider[Bytes]): Int

    Returns the next four bytes as an Int, with the first becoming the most-significant byte (i.e.

    Returns the next four bytes as an Int, with the first becoming the most-significant byte (i.e. big endian/network byte order). If the input has less than 4 bytes left the given Input.PaddingProvider is called to perform the padding and its result returned.

  11. abstract def unread(numberOfBytes: Int): Input.this.type

    "Unreads" the given number of bytes, which is guaranteed to be in the range [1, 255].

    "Unreads" the given number of bytes, which is guaranteed to be in the range [1, 255]. This is the same as moving the cursor the given number of positions back.

    NOTE: This method will never be used to move the cursor beyond the beginning of the input. As such, no range check is required by the implementation. Also the maximum number of bytes that is unread, _in total_, will never exceed 255. So any input will never have to cache more that the last 255 bytes from the head of the input.

    Also: Decoding CBOR never needs unreading, so if your use case doesn't have to support JSON then it's file to simply "implement" this method with ???.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  15. def toString(): String
    Definition Classes
    AnyRef → Any
  16. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  17. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped