TastyBuffer

scala.build.tastylib.TastyBuffer
See theTastyBuffer companion object
class TastyBuffer(initialSize: Int)

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.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

The address referring to the end of data written so far

The address referring to the end of data written so far

Attributes

def getByte(at: Addr): Int

The byte at given address

The byte at given address

Attributes

def getLongNat(at: Addr): Long

The long natural number at address at

The long natural number at address at

Attributes

def getNat(at: Addr): Int

The natural number at address at

The natural number at address at

Attributes

def writeByte(b: Int): Unit

Write a byte of data.

Write a byte of data.

Attributes

def writeBytes(data: Array[Byte], n: Int): Unit

Write the first n bytes of data.

Write the first n bytes of data.

Attributes

def writeLongNat(x: Long): Unit

Like writeNat, but for longs. Note that the binary representation of LongNat is identical to Nat if the long value is in the range Int.MIN_VALUE to Int.MAX_VALUE.

Like writeNat, but for longs. Note that the binary representation of LongNat is identical to Nat if the long value is in the range Int.MIN_VALUE to Int.MAX_VALUE.

Attributes

def writeNat(x: Int): Unit

Write a natural number in big endian format, base 128. All but the last digits have bit 0x80 set.

Write a natural number in big endian format, base 128. All but the last digits have bit 0x80 set.

Attributes

Concrete fields

var bytes: Array[Byte]

The current byte array, will be expanded as needed

The current byte array, will be expanded as needed

Attributes

var length: Int

The number of bytes written

The number of bytes written

Attributes