class TastyReader extends AnyRef
A byte array buffer that can be filled with bytes or natural numbers in TASTY format, and that supports reading and patching addresses represented as natural numbers.
- Source
- TastyReader.scala
- Alphabetic
- By Inheritance
- TastyReader
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- Implicit
- This member is added by an implicit conversion from TastyReader toany2stringadd[TastyReader] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
- def ->[B](y: B): (TastyReader, B)
- Implicit
- This member is added by an implicit conversion from TastyReader toArrowAssoc[TastyReader] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def addr(idx: Int): Addr
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val base: Int
- val bytes: Array[Byte]
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def collectWhile[T](cond: => Boolean)(op: => T): List[T]
Perform
op
while cinditioncond
holds and collect results in a list. - def currentAddr: Addr
The address of the next byte to read
- def doUntil(end: Addr)(op: => Unit): Unit
- def endAddr: Addr
the address one greater than the last brte to read
- def ensuring(cond: (TastyReader) => Boolean, msg: => Any): TastyReader
- Implicit
- This member is added by an implicit conversion from TastyReader toEnsuring[TastyReader] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: (TastyReader) => Boolean): TastyReader
- Implicit
- This member is added by an implicit conversion from TastyReader toEnsuring[TastyReader] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean, msg: => Any): TastyReader
- Implicit
- This member is added by an implicit conversion from TastyReader toEnsuring[TastyReader] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean): TastyReader
- Implicit
- This member is added by an implicit conversion from TastyReader toEnsuring[TastyReader] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def goto(addr: Addr): Unit
Set read position to the one pointed to by
addr
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def ifBefore[T](end: Addr)(op: => T, default: T): T
If before given
end
address, the result ofop
, otherwisedefault
- def index(addr: Addr): Int
- def isAtEnd: Boolean
Have all bytes been read?
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nextByte: Int
Returns the next byte of data as a natural number without advancing the read position
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def readAddr(): Addr
Read a natural number and return as an address
- def readByte(): Int
Read a byte of data.
- def readBytes(n: Int): Array[Byte]
Read the next
n
bytes ofdata
. - def readEnd(): Addr
Read a length number and return the absolute end address implied by it, given as
+. Read a length number and return the absolute end address implied by it, given as
+. - def readInt(): Int
Read an integer number in 2's complement big endian format, base 128.
Read an integer number in 2's complement big endian format, base 128. All but the last digits have bit 0x80 set.
- def readLongInt(): Long
Read a long integer number in 2's complement big endian format, base 128.
- def readLongNat(): Long
Read a natural number fitting in a Long in big endian format, base 128.
Read a natural number fitting in a Long in big endian format, base 128. All but the last digits have bit 0x80 set.
- def readNameRef(): NameRef
Read a natural number and return as a NameRef
- def readNat(): Int
Read a natural number fitting in an Int in big endian format, base 128.
Read a natural number fitting in an Int in big endian format, base 128. All but the last digits have bit 0x80 set.
- def readUncompressedLong(): Long
Read an uncompressed Long stored in 8 bytes in big endian format
- def startAddr: Addr
The address of the first byte to read, respectively byte that was read
- def subReader(start: Addr, end: Addr): TastyReader
A new reader over the same array with the same address base, but with specified start and end positions
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def until[T](end: Addr)(op: => T): List[T]
Perform
op
untilend
address is reached and collect results in a list. - final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
Deprecated Value Members
- def formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from TastyReader toStringFormat[TastyReader] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.12.16) Use
formatString.format(value)
instead ofvalue.formatted(formatString)
, or use thef""
string interpolator. In Java 15 and later,formatted
resolves to the new method in String which has reversed parameters.
- def →[B](y: B): (TastyReader, B)
- Implicit
- This member is added by an implicit conversion from TastyReader toArrowAssoc[TastyReader] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use
->
instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.
The Scala compiler and reflection APIs.