Packages

abstract class CircularBuffer extends NiolBuffer

A fixed-length circular buffer (aka "ring buffer").

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CircularBuffer
  2. NiolBuffer
  3. NiolOutput
  4. NiolInput
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CircularBuffer(storage: BytesStorage, readpos: Int, writepos: Int, lastOpWrite: Boolean)

    storage

    stores the bytes

    Attributes
    protected

Abstract Value Members

  1. abstract def addCircular(a: Int, b: Int): Int

    Computes (a + b) mod capacity, for (a+b) >= 0

    Computes (a + b) mod capacity, for (a+b) >= 0

    Attributes
    protected
  2. abstract def countCircular(begin: Int, end: Int): Int

    Counts the space between two positions: (begin + end) mod capacity

    Counts the space between two positions: (begin + end) mod capacity

    Attributes
    protected

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def +(other: NiolBuffer): BiBuffer

    Creates a new BiBuffer made of this buffer plus the other buffer, in this order.

    Creates a new BiBuffer made of this buffer plus the other buffer, in this order.

    other

    the other buffer

    returns

    a new BiBuffer(thisBuffer, other)

    Definition Classes
    NiolBuffer
  4. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. def _read(to: NiolBuffer, len: Int): Unit

    Implements read without necessarily checking for available space.

    Implements read without necessarily checking for available space.

    Attributes
    protected[niol]
    Definition Classes
    CircularBufferNiolBuffer
  6. def _read(to: ByteBuffer, len: Int): Unit

    Implements read without necessarily checking for available space.

    Implements read without necessarily checking for available space.

    Attributes
    protected[niol]
    Definition Classes
    CircularBufferNiolBuffer
  7. def _read(to: Array[Byte], off: Int, len: Int): Unit

    Implements read without necessarily checking for available space.

    Implements read without necessarily checking for available space.

    Attributes
    protected[niol]
    Definition Classes
    CircularBufferNiolBuffer
  8. def _read(): Byte

    Implements read without necessarily checking for available data.

    Implements read without necessarily checking for available data.

    Attributes
    protected[niol]
    Definition Classes
    CircularBufferNiolInput
  9. def _write(from: ByteBuffer, len: Int): Unit

    Implements write without necessarily checking for available space.

    Implements write without necessarily checking for available space.

    Attributes
    protected[niol]
    Definition Classes
    CircularBufferNiolOutput
  10. def _write(from: Array[Byte], off: Int, len: Int): Unit

    Implements write without necessarily checking for available space.

    Implements write without necessarily checking for available space.

    Attributes
    protected[niol]
    Definition Classes
    CircularBufferNiolOutput
  11. def _write(b: Byte): Unit

    Implements write without necessarily checking for available space.

    Implements write without necessarily checking for available space.

    Attributes
    protected[niol]
    Definition Classes
    CircularBufferNiolOutput
  12. final def _write(b: Long): Unit

    Implements write without necessarily checking for available space.

    Implements write without necessarily checking for available space.

    Attributes
    protected[niol]
    Definition Classes
    NiolOutput
  13. final def _write(b: Int): Unit

    Implements write without necessarily checking for available space.

    Implements write without necessarily checking for available space.

    Attributes
    protected[niol]
    Definition Classes
    NiolOutput
  14. def advance(n: Int): Unit

    Advances the read position by n bytes, as if n bytes had been read into some destination.

    Advances the read position by n bytes, as if n bytes had been read into some destination.

    n

    the number of bytes to skip

    Definition Classes
    CircularBufferNiolBuffer
  15. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  16. def capacity: Int

    The buffer's capacity.

    The buffer's capacity.

    returns

    the current capcity

    Definition Classes
    CircularBufferNiolBuffer
  17. def check(nValues: Int, n: Int): Unit

    Checks if at least n bytes can be written

    Checks if at least n bytes can be written

    Attributes
    protected[niol]
    Definition Classes
    NiolOutput
  18. def checkReadable(n: Int): Unit

    Checks if at least n bytes can be written

    Checks if at least n bytes can be written

    Attributes
    protected[niol]
    Definition Classes
    NiolBuffer
  19. def checkWritable(n: Int): Unit

    Checks if at least n bytes can be written

    Checks if at least n bytes can be written

    Attributes
    protected[niol]
    Definition Classes
    NiolOutput
  20. def clear(): Unit

    Makes the buffer empty.

    Makes the buffer empty. After a call to clear, isReadable returns false, readableBytes returns zero and writableBytes returns the buffer's capacity. The buffer's capacity is not modified.

    Definition Classes
    CircularBufferNiolBuffer
  21. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  22. def duplicate: NiolBuffer

    Returns a new buffer that shares its content with this buffer, but has independent read and write positions.

    Returns a new buffer that shares its content with this buffer, but has independent read and write positions. Initially the positions are the same but they evolve differently.

    returns

    the duplicate

    Definition Classes
    CircularBufferNiolBuffer
  23. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  24. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  25. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  26. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  27. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  28. def isEmpty: Boolean

    Checks if the buffer is empty, that is, if readableBytes == 0.

    Checks if the buffer is empty, that is, if readableBytes == 0.

    returns

    true if no byte can be read from this buffer

    Definition Classes
    CircularBufferNiolBuffer
  29. def isEnded: Boolean

    True if this output is closed or has definitively reached its end.

    True if this output is closed or has definitively reached its end. If isEnded == true then isWriteable == false and writableBytes == 0.

    returns

    true if it's closed or has definitively reached its end, false otherwise

    Definition Classes
    NiolBufferNiolOutputNiolInput
  30. def isFull: Boolean

    Checks if the buffer is full, that is, if writableBytes == 0.

    Checks if the buffer is full, that is, if writableBytes == 0.

    returns

    true if no byte can be written to this buffer

    Definition Classes
    CircularBufferNiolBuffer
  31. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  32. def isReadable: Boolean

    * Checks if a byte can be read from this NiolInput.

    * Checks if a byte can be read from this NiolInput.

    returns

    true if at least one byte can be read, false otherwise

    Definition Classes
    NiolBufferNiolInput
  33. def isWritable: Boolean

    * True if a byte can be written to this NiolOutput.

    * True if a byte can be written to this NiolOutput.

    returns

    true if at least one byte can be written, false otherwise

    Definition Classes
    NiolBufferNiolOutput
  34. var lastOpWrite: Boolean
    Attributes
    protected[this]
  35. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  36. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  37. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  38. def r(): Byte

    Reads a byte

    Reads a byte

    Definition Classes
    NiolInput
  39. def read(dst: NiolBuffer): Unit

    Fills the given NiolBuffer.

    Fills the given NiolBuffer. Throws an exception if there isn't enough data available.

    dst

    the buffer to fill

    Definition Classes
    NiolBufferNiolInput
  40. def read(dst: ByteBuffer): Unit

    Fills the given ByteBuffer.

    Fills the given ByteBuffer. Throws an exception if there isn't enough data available.

    dst

    the buffer to fill

    Definition Classes
    NiolBufferNiolInput
  41. def readBool(): Boolean

    Reads a boolean.

    Reads a boolean.

    Definition Classes
    NiolInput
  42. def readBoolF(falseValue: Byte): Boolean

    Reads one byte and returns false if it's equal to the given value, true otherwise.

    Reads one byte and returns false if it's equal to the given value, true otherwise.

    Definition Classes
    NiolInput
  43. def readBoolT(trueValue: Byte): Boolean

    Reads one byte and returns true if it's equal to the given value, false otherwise.

    Reads one byte and returns true if it's equal to the given value, false otherwise.

    Definition Classes
    NiolInput
  44. def readBoolean(): Boolean

    Reads a boolean

    Reads a boolean

    Definition Classes
    NiolInput
  45. final def readByte(): Byte

    Reads a byte

    Reads a byte

    Definition Classes
    NiolInput
  46. def readBytes(dst: Array[Byte], offset: Int, length: Int): Unit

    Reads the next length bytes and put them into dst at the given offset.

    Reads the next length bytes and put them into dst at the given offset. Throws an exception if there isn't enough data available.

    dst

    the array to fill

    offset

    the first index to use

    length

    the number of bytes to read

    Definition Classes
    NiolBufferNiolInput
  47. def readBytes(dst: Array[Byte]): Unit

    Reads the next dst.length bytes and put them into dst.

    Reads the next dst.length bytes and put them into dst. Throws an exception if there isn't enough data to fill the array.

    dst

    the array to fill

    Definition Classes
    NiolInput
  48. def readBytes(n: Int): Array[Byte]

    Reads the next n bytes.

    Reads the next n bytes. Throws an Exception if there isn't enough data available.

    n

    the number of bytes to read

    Definition Classes
    NiolInput
  49. def readChar(): Char

    Reads a big-endian char

    Reads a big-endian char

    Definition Classes
    NiolInput
  50. def readCharLE(): Char

    Reads a little-endian char

    Reads a little-endian char

    Definition Classes
    NiolInput
  51. final def readCharSequence(bytesLength: Int, charset: Charset = UTF_8): CharSequence

    Reads the next bytesLength bytes as a CharSequence encoded with the given charset.

    Reads the next bytesLength bytes as a CharSequence encoded with the given charset.

    Definition Classes
    NiolInput
  52. def readDouble(): Double

    Reads a big-endian 8-bytes double

    Reads a big-endian 8-bytes double

    Definition Classes
    NiolInput
  53. def readDoubleLE(): Double

    Reads a little-endian 8-bytes double

    Reads a little-endian 8-bytes double

    Definition Classes
    NiolInput
  54. def readDoubles(dst: Array[Double], offset: Int, length: Int): Unit

    Reads the next length doubles and put them into dst at the given offset.

    Reads the next length doubles and put them into dst at the given offset. Uses big-endian for each value. Throws an exception if there isn't enough data available.

    dst

    the array to fill

    offset

    the first index to use

    length

    the number of doubles to read

    Definition Classes
    NiolInput
  55. def readDoubles(dst: Array[Double]): Unit

    Reads the next dst.length doubles and put them into dst.

    Reads the next dst.length doubles and put them into dst. Uses big-endian for each value. Throws an exception if there isn't enough data to fill the array.

    dst

    the array to fill

    Definition Classes
    NiolInput
  56. def readDoubles(n: Int): Array[Double]

    Reads the next n doubles.

    Reads the next n doubles. Uses big-endian for each value. Throws an Exception if there isn't enough data available.

    n

    the number of doubles to read

    Definition Classes
    NiolInput
  57. def readDoublesLE(dst: Array[Double], offset: Int, length: Int): Unit

    Reads the next length doubles and put them into dst at the given offset.

    Reads the next length doubles and put them into dst at the given offset. Uses little-endian for each value. Throws an exception if there isn't enough data available.

    dst

    the array to fill

    offset

    the first index to use

    length

    the number of doubles to read

    Definition Classes
    NiolInput
  58. def readDoublesLE(dst: Array[Double]): Unit

    Reads the next dst.length doubles and put them into dst.

    Reads the next dst.length doubles and put them into dst. Uses little-endian for each value. Throws an exception if there isn't enough data to fill the array.

    dst

    the array to fill

    Definition Classes
    NiolInput
  59. def readDoublesLE(n: Int): Array[Double]

    Reads the next n doubles.

    Reads the next n doubles. Uses little-endian for each value. Throws an Exception if there isn't enough data available.

    n

    the number of doubles to read

    Definition Classes
    NiolInput
  60. def readFloat(): Float

    Reads a big-endian 4-bytes float

    Reads a big-endian 4-bytes float

    Definition Classes
    NiolInput
  61. def readFloatLE(): Float

    Reads a little-endian 4-bytes float

    Reads a little-endian 4-bytes float

    Definition Classes
    NiolInput
  62. def readFloats(dst: Array[Float], offset: Int, length: Int): Unit

    Reads the next length floats and put them into dst at the given offset.

    Reads the next length floats and put them into dst at the given offset. Uses big-endian for each value. Throws an exception if there isn't enough data available.

    dst

    the array to fill

    offset

    the first index to use

    length

    the number of floats to read

    Definition Classes
    NiolInput
  63. def readFloats(dst: Array[Float]): Unit

    Reads the next dst.length floats and put them into dst.

    Reads the next dst.length floats and put them into dst. Uses big-endian for each value. Throws an exception if there isn't enough data to fill the array.

    dst

    the array to fill

    Definition Classes
    NiolInput
  64. def readFloats(n: Int): Array[Float]

    Reads the next n floats.

    Reads the next n floats. Uses big-endian for each value. Throws an Exception if there isn't enough data available.

    n

    the number of floats to read

    Definition Classes
    NiolInput
  65. def readFloatsLE(dst: Array[Float], offset: Int, length: Int): Unit

    Reads the next length floats and put them into dst at the given offset.

    Reads the next length floats and put them into dst at the given offset. Uses little-endian for each value. Throws an exception if there isn't enough data available.

    dst

    the array to fill

    offset

    the first index to use

    length

    the number of floats to read

    Definition Classes
    NiolInput
  66. def readFloatsLE(dst: Array[Float]): Unit

    Reads the next dst.length floats and put them into dst.

    Reads the next dst.length floats and put them into dst. Uses little-endian for each value. Throws an exception if there isn't enough data to fill the array.

    dst

    the array to fill

    Definition Classes
    NiolInput
  67. def readFloatsLE(n: Int): Array[Float]

    Reads the next n floats.

    Reads the next n floats. Uses little-endian for each value. Throws an Exception if there isn't enough data available.

    n

    the number of floats to read

    Definition Classes
    NiolInput
  68. def readInt(): Int

    Reads a big-endian 4-bytes integer

    Reads a big-endian 4-bytes integer

    Definition Classes
    NiolInput
  69. def readIntLE(): Int

    Reads a little-endian 4-bytes integer

    Reads a little-endian 4-bytes integer

    Definition Classes
    NiolInput
  70. def readInts(dst: Array[Int], offset: Int, length: Int): Unit

    Reads the next length ints and put them into dst at the given offset.

    Reads the next length ints and put them into dst at the given offset. Uses big-endian for each value. Throws an exception if there isn't enough data available.

    dst

    the array to fill

    offset

    the first index to use

    length

    the number of ints to read

    Definition Classes
    NiolInput
  71. def readInts(dst: Array[Int]): Unit

    Reads the next dst.length ints and put them into dst.

    Reads the next dst.length ints and put them into dst. Uses big-endian for each value. Throws an exception if there isn't enough data to fill the array.

    dst

    the array to fill

    Definition Classes
    NiolInput
  72. def readInts(n: Int): Array[Int]

    Reads the next n ints.

    Reads the next n ints. Uses big-endian for each value. Throws an Exception if there isn't enough data available.

    n

    the number of ints to read

    Definition Classes
    NiolInput
  73. def readIntsLE(dst: Array[Int], offset: Int, length: Int): Unit

    Reads the next length ints and put them into dst at the given offset.

    Reads the next length ints and put them into dst at the given offset. Uses little-endian for each value. Throws an exception if there isn't enough data available.

    dst

    the array to fill

    offset

    the first index to use

    length

    the number of ints to read

    Definition Classes
    NiolInput
  74. def readIntsLE(dst: Array[Int]): Unit

    Reads the next dst.length ints and put them into dst.

    Reads the next dst.length ints and put them into dst. Uses little-endian for each value. Throws an exception if there isn't enough data to fill the array.

    dst

    the array to fill

    Definition Classes
    NiolInput
  75. def readIntsLE(n: Int): Array[Int]

    Reads the next n ints.

    Reads the next n ints. Uses little-endian for each value. Throws an Exception if there isn't enough data available.

    n

    the number of ints to read

    Definition Classes
    NiolInput
  76. def readLong(): Long

    Reads a big-endian 8-bytes integer

    Reads a big-endian 8-bytes integer

    Definition Classes
    NiolInput
  77. def readLongLE(): Long

    Reads a little-endian 8-bytes integer

    Reads a little-endian 8-bytes integer

    Definition Classes
    NiolInput
  78. def readLongs(dst: Array[Long], offset: Int, length: Int): Unit

    Reads the next length longs and put them into dst at the given offset.

    Reads the next length longs and put them into dst at the given offset. Uses big-endian for each value. Throws an exception if there isn't enough data available.

    dst

    the array to fill

    offset

    the first index to use

    length

    the number of longs to read

    Definition Classes
    NiolInput
  79. def readLongs(dst: Array[Long]): Unit

    Reads the next dst.length longs and put them into dst.

    Reads the next dst.length longs and put them into dst. Uses big-endian for each value. Throws an exception if there isn't enough data to fill the array.

    dst

    the array to fill

    Definition Classes
    NiolInput
  80. def readLongs(n: Int): Array[Long]

    Reads the next n longs.

    Reads the next n longs. Uses big-endian for each value. Throws an Exception if there isn't enough data available.

    n

    the number of longs to read

    Definition Classes
    NiolInput
  81. def readLongsLE(dst: Array[Long], offset: Int, length: Int): Unit

    Reads the next length longs and put them into dst at the given offset.

    Reads the next length longs and put them into dst at the given offset. Uses little-endian for each value. Throws an exception if there isn't enough data available.

    dst

    the array to fill

    offset

    the first index to use

    length

    the number of longs to read

    Definition Classes
    NiolInput
  82. def readLongsLE(dst: Array[Long]): Unit

    Reads the next dst.length longs and put them into dst.

    Reads the next dst.length longs and put them into dst. Uses little-endian for each value. Throws an exception if there isn't enough data to fill the array.

    dst

    the array to fill

    Definition Classes
    NiolInput
  83. def readLongsLE(n: Int): Array[Long]

    Reads the next n longs.

    Reads the next n longs. Uses little-endian for each value. Throws an Exception if there isn't enough data available.

    n

    the number of longs to read

    Definition Classes
    NiolInput
  84. def readMedium(): Int

    Reads a big-endian 3-bytes integer

    Reads a big-endian 3-bytes integer

    Definition Classes
    NiolInput
  85. def readMediumLE(): Int

    Reads a little-endian 3-bytes integer

    Reads a little-endian 3-bytes integer

    Definition Classes
    NiolInput
  86. final def readSVarIntZigZag(maxBytes: Int = 5): Int

    Reads a variable-length int using the signed/zig-zag encoding.

    Reads a variable-length int using the signed/zig-zag encoding.

    Definition Classes
    NiolInput
  87. final def readSVarLongZigZag(maxBytes: Int = 10): Long

    Reads a variable-length long using the signed/zig-zag encoding.

    Reads a variable-length long using the signed/zig-zag encoding.

    Definition Classes
    NiolInput
  88. def readShort(): Short

    Reads a big-endian short

    Reads a big-endian short

    Definition Classes
    NiolInput
  89. final def readShortCharSequence(charset: Charset = UTF_8): CharSequence

    Reads a big-endian unsigned short to determine the sequence's length, then reads it.

    Reads a big-endian unsigned short to determine the sequence's length, then reads it.

    Definition Classes
    NiolInput
  90. final def readShortCharSequenceLE(charset: Charset = UTF_8): CharSequence

    Reads a little-endian unsigned short to determine the sequence's length, then reads it.

    Reads a little-endian unsigned short to determine the sequence's length, then reads it.

    Definition Classes
    NiolInput
  91. def readShortLE(): Short

    Reads a little-endian short

    Reads a little-endian short

    Definition Classes
    NiolInput
  92. final def readShortString(charset: Charset = UTF_8): String

    Reads a big-endian unsigned short to determine the string's length, then reads it.

    Reads a big-endian unsigned short to determine the string's length, then reads it.

    Definition Classes
    NiolInput
  93. final def readShortStringLE(charset: Charset = UTF_8): String

    Reads a little-endian unsigned short to determine the string's length, then reads it.

    Reads a little-endian unsigned short to determine the string's length, then reads it.

    Definition Classes
    NiolInput
  94. def readShorts(dst: Array[Short], offset: Int, length: Int): Unit

    Reads the next length shorts and put them into dst at the given offset.

    Reads the next length shorts and put them into dst at the given offset. Uses big-endian for each value. Throws an exception if there isn't enough data available.

    dst

    the array to fill

    offset

    the first index to use

    length

    the number of shorts to read

    Definition Classes
    NiolInput
  95. def readShorts(dst: Array[Short]): Unit

    Reads the next dst.length shorts and put them into dst.

    Reads the next dst.length shorts and put them into dst. Uses big-endian for each value. Throws an exception if there isn't enough data to fill the array.

    dst

    the array to fill

    Definition Classes
    NiolInput
  96. def readShorts(n: Int): Array[Short]

    Reads the next n shorts.

    Reads the next n shorts. Uses big-endian for each value. Throws an Exception if there isn't enough data available.

    n

    the number of shorts to read

    Definition Classes
    NiolInput
  97. def readShortsLE(dst: Array[Short], offset: Int, length: Int): Unit

    Reads the next length shorts and put them into dst at the given offset.

    Reads the next length shorts and put them into dst at the given offset. Uses little-endian for each value. Throws an exception if there isn't enough data available.

    dst

    the array to fill

    offset

    the first index to use

    length

    the number of shorts to read

    Definition Classes
    NiolInput
  98. def readShortsLE(dst: Array[Short]): Unit

    Reads the next dst.length shorts and put them into dst.

    Reads the next dst.length shorts and put them into dst. Uses little-endian for each value. Throws an exception if there isn't enough data to fill the array.

    dst

    the array to fill

    Definition Classes
    NiolInput
  99. def readShortsLE(n: Int): Array[Short]

    Reads the next n shorts.

    Reads the next n shorts. Uses little-endian for each value. Throws an Exception if there isn't enough data available.

    n

    the number of shorts to read

    Definition Classes
    NiolInput
  100. def readSome(dst: NiolBuffer): Int

    Reads at most dst.writableBytes bytes into dst.

    Reads at most dst.writableBytes bytes into dst. The buffer's position will be advanced by the number of bytes read from this NiolInput.

    dst

    the buffer to fill

    Definition Classes
    CircularBufferNiolInput
  101. def readSome(dst: OutputStream): Int

    Reads some bytes and writes them to dst.

    Reads some bytes and writes them to dst. Returns the actual number of bytes read, possibly zero.

    dst

    the channel to write to

    returns

    the number of bytes read

    Definition Classes
    CircularBufferNiolBuffer
  102. def readSome(dst: GatheringByteChannel): Int

    Reads some bytes and writes them to dst.

    Reads some bytes and writes them to dst. Returns the actual number of bytes read, possibly zero.

    dst

    the channel to write to

    returns

    the number of bytes read

    Definition Classes
    CircularBufferNiolBuffer
  103. def readSome(dst: ByteBuffer): Int

    Reads at most dst.remaining() bytes into dst.

    Reads at most dst.remaining() bytes into dst. The buffer's position will be advanced by the number of bytes read from this NiolInput.

    dst

    the buffer to fill

    Definition Classes
    NiolBufferNiolInput
  104. def readSomeBytes(dst: Array[Byte], offset: Int, length: Int): Int

    Reads at most length bytes and put them into dst at the given offset.

    Reads at most length bytes and put them into dst at the given offset. Returns the actual number of bytes read, possibly zero.

    dst

    the array to fill

    offset

    the first index to use

    returns

    the number of bytes read

    Definition Classes
    NiolBufferNiolInput
  105. def readSomeBytes(dst: Array[Byte]): Int

    Reads at most dst.length bytes into dst.

    Reads at most dst.length bytes into dst. Returns the actual number of bytes read, possibly zero.

    dst

    the array to fill

    returns

    the number of bytes read

    Definition Classes
    NiolInput
  106. final def readString(bytesLength: Int, charset: Charset = UTF_8): String

    Reads the next bytesLength bytes as a String encoded with the given charset.

    Reads the next bytesLength bytes as a String encoded with the given charset.

    Definition Classes
    NiolInput
  107. final def readUUID(): UUID

    Reads a big-endian 16-bytes UUID

    Reads a big-endian 16-bytes UUID

    Definition Classes
    NiolInput
  108. final def readUnsignedByte(): Int

    Reads an unsigned byte as an int

    Reads an unsigned byte as an int

    Definition Classes
    NiolInput
  109. final def readUnsignedInt(): Long

    Reads a big-endian unsigned int as a long

    Reads a big-endian unsigned int as a long

    Definition Classes
    NiolInput
  110. final def readUnsignedIntLE(): Long

    Reads a little-endian unsigned int as a long

    Reads a little-endian unsigned int as a long

    Definition Classes
    NiolInput
  111. final def readUnsignedMedium(): Int

    Reads a big-endian unsigned medium as an int

    Reads a big-endian unsigned medium as an int

    Definition Classes
    NiolInput
  112. final def readUnsignedMediumLE(): Int

    Reads a little-endian unsigned medium as an int

    Reads a little-endian unsigned medium as an int

    Definition Classes
    NiolInput
  113. final def readUnsignedShort(): Int

    Reads a big-endian unsigned short as an int

    Reads a big-endian unsigned short as an int

    Definition Classes
    NiolInput
  114. final def readUnsignedShortLE(): Int

    Reads a little-endian unsigned short as an int

    Reads a little-endian unsigned short as an int

    Definition Classes
    NiolInput
  115. final def readVarCharSequence(charset: Charset = UTF_8): CharSequence

    Reads a VarInt to determine the sequence's length, then reads the CharSequence.

    Reads a VarInt to determine the sequence's length, then reads the CharSequence.

    Definition Classes
    NiolInput
  116. def readVarInt(maxBytes: Int = 5): Int

    Reads a variable-length int using the normal/unsigned encoding.

    Reads a variable-length int using the normal/unsigned encoding.

    Definition Classes
    NiolInput
  117. def readVarLong(maxBytes: Int = 10): Long

    Reads a variable-length long using the normal/unsigned encoding.

    Reads a variable-length long using the normal/unsigned encoding.

    Definition Classes
    NiolInput
  118. final def readVarString(charset: Charset = UTF_8): String

    Reads a VarInt to determine the string's length, then reads the string.

    Reads a VarInt to determine the string's length, then reads the string.

    Definition Classes
    NiolInput
  119. def readableBytes: Int

    The number of bytes that can be read from this buffer.

    The number of bytes that can be read from this buffer. This number is always >= 0. If readableBytes == 0 then no byte can be read and isReadable == false.

    returns

    n > 0 if can read n bytes, 0 if closed input or empty buffer

    Definition Classes
    CircularBufferNiolBuffer
  120. var readpos: Int
    Attributes
    protected[this]
  121. def slice(length: Int): NiolBuffer

    Creates a "slice" that gives a limited access to the next length readable bytes.

    Creates a "slice" that gives a limited access to the next length readable bytes. No copy is involved. Throws an exception if readableBytes < length. The returned buffer satisfies readableBytes == length.

    length

    the length of the slice

    returns

    the slice

    Definition Classes
    CircularBufferNiolBuffer
  122. val storage: BytesStorage
    Attributes
    protected[this]
  123. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  124. def toArray(): Array[Byte]

    Reads all the readable bytes of this buffer into a new byte array.

    Reads all the readable bytes of this buffer into a new byte array.

    returns

    the byte array containing all the bytes read

    Definition Classes
    NiolBuffer
  125. def toString(): String
    Definition Classes
    CircularBufferNiolBuffer → AnyRef → Any
  126. def tryRead(): Int

    Attempts to read a byte.

    Attempts to read a byte. If the input is empty, returns -1. Otherwise, returns the byte value as an int in the range 0-255.

    returns

    the byte value in range 0-255, or -1 if the input is empty

    Definition Classes
    NiolInput
  127. def tryWrite(b: Byte): Boolean

    Attempts to write a byte.

    Attempts to write a byte. Returns false if the output is full.

    b

    the byte to write

    returns

    true if the byte has been write, false if the output is full

    Definition Classes
    NiolOutput
  128. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  129. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  130. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  131. def writableBytes: Int

    The number of bytes that can be written to this NiolOutput.

    The number of bytes that can be written to this NiolOutput. This number is always >= 0. It may be underestimated except when it's zero, that is, if writableBytes == 0 then no byte can be written and isWritable == false.

    returns

    n > 0 if can write n bytes, 0 if closed output or full buffer

    Definition Classes
    CircularBufferNiolOutput
  132. def writableSlice(length: Int): NiolBuffer

    Creates a "slice" that gives a limited access to the next length writable bytes.

    Creates a "slice" that gives a limited access to the next length writable bytes. No copy is involved. Throws an exception if writableBytes < length. The returned buffer satisfies writableBytes == length.

    length

    the length of the slice

    returns

    the writable slice

    Definition Classes
    CircularBufferNiolBuffer
  133. def write(src: NiolBuffer): Unit

    Writes all of the given NiolBuffer.

    Writes all of the given NiolBuffer. Throws an exception if there isn't enough space for the data.

    src

    the buffer to write

    Definition Classes
    CircularBufferNiolOutput
  134. def write(src: Array[Byte], offset: Int, length: Int): Unit

    Writes the content of src, starting at index offset and ending at index offset+length-1.

    Writes the content of src, starting at index offset and ending at index offset+length-1. Throws an exception if there isn't enough space for the data or if the array index goes out of bounds.

    src

    the array to write

    offset

    the first index to use

    length

    the number of bytes to write

    Definition Classes
    NiolOutput
  135. def write(src: Array[Byte]): Unit

    Writes all the bytes of src.

    Writes all the bytes of src. Throws an exception if there isn't enough space for the data.

    src

    the array to write

    Definition Classes
    NiolOutput
  136. def write(src: ByteBuffer): Unit

    Writes all of the given ByteBuffer.

    Writes all of the given ByteBuffer. Throws an exception if there isn't enough space for the data.

    src

    the buffer to write

    Definition Classes
    NiolOutput
  137. def write(b: Byte): Unit

    Writes a byte.

    Writes a byte.

    b

    the byte to write

    Definition Classes
    NiolOutput
  138. def writeBool(bool: Boolean, trueValue: Byte, falseValue: Byte): Unit

    Writes a boolean.

    Writes a boolean. If it's true, writes trueValue. If it's false, writes falseValue.

    bool

    the boolean to write

    trueValue

    the byte to write if the boolean is true

    falseValue

    the byte to write if the boolean is false

    Definition Classes
    NiolOutput
  139. def writeBool(bool: Boolean): Unit

    Writes a boolean.

    Writes a boolean. The default behavior is as follow: If it's true, writes the byte 1. If it's false, writes the byte 0.

    bool

    the boolean to write

    Definition Classes
    NiolOutput
  140. def writeBoolean(boolean: Boolean): Unit

    Writes a boolean.

    Writes a boolean. The default behavior is as follow: If the value is true, writes the byte 1. If it's false, writes the byte 0.

    boolean

    the boolean to write

    Definition Classes
    NiolOutput
  141. def writeBooleans(src: Array[Boolean], offset: Int, length: Int): Unit

    Writes the content of src, starting at index offset and ending at index offset+length-1.

    Writes the content of src, starting at index offset and ending at index offset+length-1. Throws an exception if there isn't enough space for the data or if the array index goes out of bounds.

    src

    the array to write

    offset

    the first index to use

    length

    the number of booleans to write

    Definition Classes
    NiolOutput
  142. def writeBooleans(src: Array[Boolean]): Unit

    Writes all the booleans of src.

    Writes all the booleans of src. Throws an exception if there isn't enough space for the data.

    src

    the array to write

    Definition Classes
    NiolOutput
  143. final def writeByte(l: Long): Unit

    Writes the least significant byte of a long.

    Writes the least significant byte of a long.

    l

    the value to write

    Definition Classes
    NiolOutput
  144. final def writeByte(i: Int): Unit

    Writes the least significant byte of an int.

    Writes the least significant byte of an int.

    i

    the value to write

    Definition Classes
    NiolOutput
  145. final def writeByte(b: Byte): Unit

    Writes a byte.

    Writes a byte.

    b

    the byte to write

    Definition Classes
    NiolOutput
  146. final def writeChar(c: Char): Unit

    Writes a big-endian char.

    Writes a big-endian char.

    c

    the value to write

    Definition Classes
    NiolOutput
  147. final def writeCharLE(c: Char): Unit

    Writes a little-endian char.

    Writes a little-endian char.

    c

    the value to write

    Definition Classes
    NiolOutput
  148. final def writeCharSequence(csq: CharSequence, charset: Charset = UTF_8): Unit

    Writes a CharSequence with the given charset.

    Writes a CharSequence with the given charset. The written data isn't prefixed by its length.

    csq

    the value to write

    charset

    the charset to encode the CharSequence with

    Definition Classes
    NiolOutput
  149. def writeDouble(d: Double): Unit

    Writes a big-endian 8-bytes double.

    Writes a big-endian 8-bytes double.

    d

    the value to write

    Definition Classes
    NiolOutput
  150. def writeDoubleLE(d: Double): Unit

    Writes a little-endian 8-bytes double.

    Writes a little-endian 8-bytes double.

    d

    the value to write

    Definition Classes
    NiolOutput
  151. def writeDoubles(src: Array[Double], offset: Int, length: Int): Unit

    Writes the content of src, starting at index offset and ending at index offset+length-1.

    Writes the content of src, starting at index offset and ending at index offset+length-1. Uses big-endian for each value. Throws an exception if there isn't enough space for the data or if the array index goes out of bounds.

    src

    the array to write

    offset

    the first index to use

    length

    the number of doubles to write

    Definition Classes
    NiolOutput
  152. def writeDoubles(src: Array[Double]): Unit

    Writes all the doubles of src.

    Writes all the doubles of src. Uses big-endian for each value. Throws an exception if there isn't enough space for the data.

    src

    the array to write

    Definition Classes
    NiolOutput
  153. def writeDoublesLE(src: Array[Double], offset: Int, length: Int): Unit

    Writes the content of src, starting at index offset and ending at index offset+length-1.

    Writes the content of src, starting at index offset and ending at index offset+length-1. Uses little-endian for each value. Throws an exception if there isn't enough space for the data or if the array index goes out of bounds.

    src

    the array to write

    offset

    the first index to use

    length

    the number of doubles to write

    Definition Classes
    NiolOutput
  154. def writeDoublesLE(src: Array[Double]): Unit

    Writes all the doubles of src.

    Writes all the doubles of src. Uses little-endian for each value. Throws an exception if there isn't enough space for the data.

    src

    the array to write

    Definition Classes
    NiolOutput
  155. final def writeFloat(f: Double): Unit

    Writes a big-endian 4-bytes float.

    Writes a big-endian 4-bytes float.

    f

    the value to write

    Definition Classes
    NiolOutput
  156. def writeFloat(f: Float): Unit

    Writes a big-endian 4-bytes float.

    Writes a big-endian 4-bytes float.

    f

    the value to write

    Definition Classes
    NiolOutput
  157. final def writeFloatLE(f: Double): Unit

    Writes a little-endian 4-bytes float.

    Writes a little-endian 4-bytes float.

    f

    the value to write

    Definition Classes
    NiolOutput
  158. def writeFloatLE(f: Float): Unit

    Writes a little-endian 4-bytes float.

    Writes a little-endian 4-bytes float.

    f

    the value to write

    Definition Classes
    NiolOutput
  159. def writeFloats(src: Array[Float], offset: Int, length: Int): Unit

    Writes the content of src, starting at index offset and ending at index offset+length-1.

    Writes the content of src, starting at index offset and ending at index offset+length-1. Uses big-endian for each value. Throws an exception if there isn't enough space for the data or if the array index goes out of bounds.

    src

    the array to write

    offset

    the first index to use

    length

    the number of floats to write

    Definition Classes
    NiolOutput
  160. def writeFloats(src: Array[Float]): Unit

    Writes all the floats of src.

    Writes all the floats of src. Uses big-endian for each value. Throws an exception if there isn't enough space for the data.

    src

    the array to write

    Definition Classes
    NiolOutput
  161. def writeFloatsLE(src: Array[Float], offset: Int, length: Int): Unit

    Writes the content of src, starting at index offset and ending at index offset+length-1.

    Writes the content of src, starting at index offset and ending at index offset+length-1. Uses little-endian for each value. Throws an exception if there isn't enough space for the data or if the array index goes out of bounds.

    src

    the array to write

    offset

    the first index to use

    length

    the number of floats to write

    Definition Classes
    NiolOutput
  162. def writeFloatsLE(src: Array[Float]): Unit

    Writes all the floats of src.

    Writes all the floats of src. Uses little-endian for each value. Throws an exception if there isn't enough space for the data.

    src

    the array to write

    Definition Classes
    NiolOutput
  163. def writeInt(i: Int): Unit

    Writes a big-endian 4-bytes integer.

    Writes a big-endian 4-bytes integer.

    i

    the value to write

    Definition Classes
    NiolOutput
  164. def writeIntLE(i: Int): Unit

    Writes a little-endian 4-bytes integer.

    Writes a little-endian 4-bytes integer.

    i

    the value to write

    Definition Classes
    NiolOutput
  165. def writeInts(src: Array[Int], offset: Int, length: Int): Unit

    Writes the content of src, starting at index offset and ending at index offset+length-1.

    Writes the content of src, starting at index offset and ending at index offset+length-1. Uses big-endian for each value. Throws an exception if there isn't enough space for the data or if the array index goes out of bounds.

    src

    the array to write

    offset

    the first index to use

    length

    the number of ints to write

    Definition Classes
    NiolOutput
  166. def writeInts(src: Array[Int]): Unit

    Writes all the ints of src.

    Writes all the ints of src. Uses big-endian for each value. Throws an exception if there isn't enough space for the data.

    src

    the array to write

    Definition Classes
    NiolOutput
  167. def writeIntsLE(src: Array[Int], offset: Int, length: Int): Unit

    Writes the content of src, starting at index offset and ending at index offset+length-1.

    Writes the content of src, starting at index offset and ending at index offset+length-1. Uses little-endian for each value. Throws an exception if there isn't enough space for the data or if the array index goes out of bounds.

    src

    the array to write

    offset

    the first index to use

    length

    the number of ints to write

    Definition Classes
    NiolOutput
  168. def writeIntsLE(src: Array[Int]): Unit

    Writes all the ints of src.

    Writes all the ints of src. Uses little-endian for each value. Throws an exception if there isn't enough space for the data.

    src

    the array to write

    Definition Classes
    NiolOutput
  169. def writeLong(l: Long): Unit

    Writes a big-endian 8-bytes integer.

    Writes a big-endian 8-bytes integer.

    l

    the value to write

    Definition Classes
    NiolOutput
  170. def writeLongLE(l: Long): Unit

    Writes a little-endian 8-bytes integer.

    Writes a little-endian 8-bytes integer.

    l

    the value to write

    Definition Classes
    NiolOutput
  171. def writeLongs(src: Array[Long], offset: Int, length: Int): Unit

    Writes the content of src, starting at index offset and ending at index offset+length-1.

    Writes the content of src, starting at index offset and ending at index offset+length-1. Uses big-endian for each value. Throws an exception if there isn't enough space for the data or if the array index goes out of bounds.

    src

    the array to write

    offset

    the first index to use

    length

    the number of longs to write

    Definition Classes
    NiolOutput
  172. def writeLongs(src: Array[Long]): Unit

    Writes all the longs of src.

    Writes all the longs of src. Uses big-endian for each value. Throws an exception if there isn't enough space for the data.

    src

    the array to write

    Definition Classes
    NiolOutput
  173. def writeLongsLE(src: Array[Long], offset: Int, length: Int): Unit

    Writes the content of src, starting at index offset and ending at index offset+length-1.

    Writes the content of src, starting at index offset and ending at index offset+length-1. Uses little-endian for each value. Throws an exception if there isn't enough space for the data or if the array index goes out of bounds.

    src

    the array to write

    offset

    the first index to use

    length

    the number of longs to write

    Definition Classes
    NiolOutput
  174. def writeLongsLE(src: Array[Long]): Unit

    Writes all the longs of src.

    Writes all the longs of src. Uses little-endian for each value. Throws an exception if there isn't enough space for the data.

    src

    the array to write

    Definition Classes
    NiolOutput
  175. def writeMedium(m: Int): Unit

    Writes a big-endian 3-bytes integer.

    Writes a big-endian 3-bytes integer.

    m

    the value to write

    Definition Classes
    NiolOutput
  176. def writeMediumLE(m: Int): Unit

    Writes a little-endian 3-bytes integer.

    Writes a little-endian 3-bytes integer.

    m

    the value to write

    Definition Classes
    NiolOutput
  177. final def writeSVarIntZigZag(n: Int): Unit

    Writes a variable-length int using the signed/zig-zag encoding.

    Writes a variable-length int using the signed/zig-zag encoding.

    n

    the value to write

    Definition Classes
    NiolOutput
  178. final def writeSVarLongZigZag(n: Long): Unit

    Writes a variable-length long using the signed/zig-zag encoding.

    Writes a variable-length long using the signed/zig-zag encoding.

    n

    the value to write

    Definition Classes
    NiolOutput
  179. def writeShort(i: Int): Unit

    Writes a big-endian short.

    Writes a big-endian short.

    i

    the value to write

    Definition Classes
    NiolOutput
  180. final def writeShort(s: Short): Unit

    Writes a big-endian short.

    Writes a big-endian short.

    s

    the value to write

    Definition Classes
    NiolOutput
  181. def writeShortLE(i: Int): Unit

    Writes a little-endian short.

    Writes a little-endian short.

    i

    the value to write

    Definition Classes
    NiolOutput
  182. final def writeShortLE(s: Short): Unit

    Writes a little-endian short.

    Writes a little-endian short.

    s

    the value to write

    Definition Classes
    NiolOutput
  183. final def writeShortString(csq: CharSequence, charset: Charset = UTF_8): Unit

    Writes a CharSequence with the given charset, prefixed by its length written as a big-endian 2-bytes unsigned integer.

    Writes a CharSequence with the given charset, prefixed by its length written as a big-endian 2-bytes unsigned integer.

    csq

    the value to write

    charset

    the charset to encode the CharSequence with

    Definition Classes
    NiolOutput
  184. final def writeShortStringLE(csq: CharSequence, charset: Charset = UTF_8): Unit

    Writes a CharSequence with the given charset, prefixed by its length written as a little-endian 2-bytes unsigned integer.

    Writes a CharSequence with the given charset, prefixed by its length written as a little-endian 2-bytes unsigned integer.

    csq

    the value to write

    charset

    the charset to encode the CharSequence with

    Definition Classes
    NiolOutput
  185. def writeShorts(src: Array[Short], offset: Int, length: Int): Unit

    Writes the content of src, starting at index offset and ending at index offset+length-1.

    Writes the content of src, starting at index offset and ending at index offset+length-1. Uses big-endian for each value. Throws an exception if there isn't enough space for the data or if the array index goes out of bounds.

    src

    the array to write

    offset

    the first index to use

    length

    the number of shorts to write

    Definition Classes
    NiolOutput
  186. def writeShorts(src: Array[Short]): Unit

    Writes all the shorts of src.

    Writes all the shorts of src. Uses big-endian for each value. Throws an exception if there isn't enough space for the data.

    src

    the array to write

    Definition Classes
    NiolOutput
  187. def writeShortsLE(src: Array[Short], offset: Int, length: Int): Unit

    Writes the content of src, starting at index offset and ending at index offset+length-1.

    Writes the content of src, starting at index offset and ending at index offset+length-1. Uses little-endian for each value. Throws an exception if there isn't enough space for the data or if the array index goes out of bounds.

    src

    the array to write

    offset

    the first index to use

    length

    the number of shorts to write

    Definition Classes
    NiolOutput
  188. def writeShortsLE(src: Array[Short]): Unit

    Writes all the shorts of src.

    Writes all the shorts of src. Uses little-endian for each value. Throws an exception if there isn't enough space for the data.

    src

    the array to write

    Definition Classes
    NiolOutput
  189. def writeSome(src: NiolBuffer): Int

    Writes at most src.readableBytes bytes from src into this output.

    Writes at most src.readableBytes bytes from src into this output. The buffer's read position will be advanced by the number of bytes written to this NiolOutput.

    src

    the buffer to write

    Definition Classes
    CircularBufferNiolOutput
  190. def writeSome(src: InputStream): Int

    Writes some bytes from src.

    Writes some bytes from src. Returns the actual number of bytes written, possibly zero.

    src

    the stream providing the data

    returns

    the number of bytes read from src, or -1 if the end of the stream has been reached

    Definition Classes
    CircularBufferNiolBuffer
  191. def writeSome(src: ScatteringByteChannel): Int

    Writes at most maxBytes bytes from src.

    Writes at most maxBytes bytes from src. Returns the actual number of bytes written, possibly zero.

    src

    the channel providing the data

    returns

    the number of bytes read from src, or -1 if the end of the stream has been reached

    Definition Classes
    CircularBufferNiolBuffer
  192. def writeSome(src: ByteBuffer): Int

    Writes at most src.remaining() bytes from src into this output.

    Writes at most src.remaining() bytes from src into this output. The buffer's position will be advanced by the number of bytes written to this NiolOutput.

    src

    the buffer to write

    Definition Classes
    CircularBufferNiolOutput
  193. def writeSome(src: Array[Byte], offset: Int, length: Int): Int

    Writes at most length bytes of src, starting at index offset.

    Writes at most length bytes of src, starting at index offset. Returns the actual number of bytes written, possibly zero.

    src

    the array to write

    offset

    the first index to use

    length

    the number of bytes to write

    returns

    the number of bytes written

    Definition Classes
    NiolOutput
  194. def writeSome(src: Array[Byte]): Int

    Writes at most src.length bytes of src.

    Writes at most src.length bytes of src. Returns the actual number of bytes written, possibly zero.

    src

    the array to write

    returns

    the number of bytes written

    Definition Classes
    NiolOutput
  195. def writeSomeBooleans(src: Array[Boolean], offset: Int, length: Int): Int

    Writes at most length booleans of src, starting at index offset.

    Writes at most length booleans of src, starting at index offset. Returns the actual number of booleans written, possibly zero.

    src

    the array to write

    offset

    the first index to use

    length

    the number of booleans to write

    returns

    the number of booleans written

    Definition Classes
    NiolOutput
  196. def writeSomeBooleans(src: Array[Boolean]): Int

    Writes at most src.length booleans of src.

    Writes at most src.length booleans of src. Returns the actual number of booleans written, possibly zero.

    src

    the array to write

    returns

    the number of booleans written

    Definition Classes
    NiolOutput
  197. def writeSomeDoubles(src: Array[Double], offset: Int, length: Int): Int

    Writes at most length doubles of src, starting at index offset.

    Writes at most length doubles of src, starting at index offset. Uses big-endian for each value. Returns the actual number of doubles written, possibly zero.

    src

    the array to write

    offset

    the first index to use

    length

    the number of doubles to write

    returns

    the number of doubles written

    Definition Classes
    NiolOutput
  198. def writeSomeDoubles(src: Array[Double]): Int

    Writes at most src.length doubles of src.

    Writes at most src.length doubles of src. Uses big-endian for each value. Returns the actual number of doubles written, possibly zero.

    src

    the array to write

    returns

    the number of doubles written

    Definition Classes
    NiolOutput
  199. def writeSomeDoublesLE(src: Array[Double], offset: Int, length: Int): Int

    Writes at most length doubles of src, starting at index offset.

    Writes at most length doubles of src, starting at index offset. Uses little-endian for each value. Returns the actual number of doubles written, possibly zero.

    src

    the array to write

    offset

    the first index to use

    length

    the number of doubles to write

    returns

    the number of doubles written

    Definition Classes
    NiolOutput
  200. def writeSomeDoublesLE(src: Array[Double]): Int

    Writes at most src.length doubles of src for each value.

    Writes at most src.length doubles of src for each value. Uses little-endian for each value. Returns the actual number of doubles written, possibly zero.

    src

    the array to write

    returns

    the number of doubles written

    Definition Classes
    NiolOutput
  201. def writeSomeFloats(src: Array[Float], offset: Int, length: Int): Int

    Writes at most length floats of src, starting at index offset.

    Writes at most length floats of src, starting at index offset. Uses big-endian for each value. Returns the actual number of floats written, possibly zero.

    src

    the array to write

    offset

    the first index to use

    length

    the number of floats to write

    returns

    the number of floats written

    Definition Classes
    NiolOutput
  202. def writeSomeFloats(src: Array[Float]): Int

    Writes at most src.length floats of src.

    Writes at most src.length floats of src. Uses big-endian for each value. Returns the actual number of floats written, possibly zero.

    src

    the array to write

    returns

    the number of floats written

    Definition Classes
    NiolOutput
  203. def writeSomeFloatsLE(src: Array[Float], offset: Int, length: Int): Int

    Writes at most length floats of src, starting at index offset.

    Writes at most length floats of src, starting at index offset. Uses little-endian for each value. Returns the actual number of floats written, possibly zero.

    src

    the array to write

    offset

    the first index to use

    length

    the number of floats to write

    returns

    the number of floats written

    Definition Classes
    NiolOutput
  204. def writeSomeFloatsLE(src: Array[Float]): Int

    Writes at most src.length floats of src for each value.

    Writes at most src.length floats of src for each value. Uses little-endian for each value. Returns the actual number of floats written, possibly zero.

    src

    the array to write

    returns

    the number of floats written

    Definition Classes
    NiolOutput
  205. def writeSomeInts(src: Array[Int], offset: Int, length: Int): Int

    Writes at most length ints of src, starting at index offset.

    Writes at most length ints of src, starting at index offset. Uses big-endian for each value. Returns the actual number of ints written, possibly zero.

    src

    the array to write

    offset

    the first index to use

    length

    the number of ints to write

    returns

    the number of ints written

    Definition Classes
    NiolOutput
  206. def writeSomeInts(src: Array[Int]): Int

    Writes at most src.length ints of src.

    Writes at most src.length ints of src. Uses big-endian for each value. Returns the actual number of ints written, possibly zero.

    src

    the array to write

    returns

    the number of ints written

    Definition Classes
    NiolOutput
  207. def writeSomeIntsLE(src: Array[Int], offset: Int, length: Int): Int

    Writes at most length ints of src, starting at index offset.

    Writes at most length ints of src, starting at index offset. Uses little-endian for each value. Returns the actual number of ints written, possibly zero.

    src

    the array to write

    offset

    the first index to use

    length

    the number of ints to write

    returns

    the number of ints written

    Definition Classes
    NiolOutput
  208. def writeSomeIntsLE(src: Array[Int]): Int

    Writes at most src.length ints of src for each value.

    Writes at most src.length ints of src for each value. Uses little-endian for each value. Returns the actual number of ints written, possibly zero.

    src

    the array to write

    returns

    the number of ints written

    Definition Classes
    NiolOutput
  209. def writeSomeLongs(src: Array[Long], offset: Int, length: Int): Int

    Writes at most length longs of src, starting at index offset.

    Writes at most length longs of src, starting at index offset. Uses big-endian for each value. Returns the actual number of longs written, possibly zero.

    src

    the array to write

    offset

    the first index to use

    length

    the number of longs to write

    returns

    the number of longs written

    Definition Classes
    NiolOutput
  210. def writeSomeLongs(src: Array[Long]): Int

    Writes at most src.length longs of src.

    Writes at most src.length longs of src. Uses big-endian for each value. Returns the actual number of longs written, possibly zero.

    src

    the array to write

    returns

    the number of longs written

    Definition Classes
    NiolOutput
  211. def writeSomeLongsLE(src: Array[Long], offset: Int, length: Int): Int

    Writes at most length longs of src, starting at index offset.

    Writes at most length longs of src, starting at index offset. Uses little-endian for each value. Returns the actual number of longs written, possibly zero.

    src

    the array to write

    offset

    the first index to use

    length

    the number of longs to write

    returns

    the number of longs written

    Definition Classes
    NiolOutput
  212. def writeSomeLongsLE(src: Array[Long]): Int

    Writes at most src.length longs of src for each value.

    Writes at most src.length longs of src for each value. Uses little-endian for each value. Returns the actual number of longs written, possibly zero.

    src

    the array to write

    returns

    the number of longs written

    Definition Classes
    NiolOutput
  213. def writeSomeShorts(src: Array[Short], offset: Int, length: Int): Int

    Writes at most length shorts of src, starting at index offset.

    Writes at most length shorts of src, starting at index offset. Uses big-endian for each value. Returns the actual number of shorts written, possibly zero.

    src

    the array to write

    offset

    the first index to use

    length

    the number of shorts to write

    returns

    the number of shorts written

    Definition Classes
    NiolOutput
  214. def writeSomeShorts(src: Array[Short]): Int

    Writes at most src.length shorts of src.

    Writes at most src.length shorts of src. Uses big-endian for each value. Returns the actual number of shorts written, possibly zero.

    src

    the array to write

    returns

    the number of shorts written

    Definition Classes
    NiolOutput
  215. def writeSomeShortsLE(src: Array[Short], offset: Int, length: Int): Int

    Writes at most length shorts of src, starting at index offset.

    Writes at most length shorts of src, starting at index offset. Uses little-endian for each value. Returns the actual number of shorts written, possibly zero.

    src

    the array to write

    offset

    the first index to use

    length

    the number of shorts to write

    returns

    the number of shorts written

    Definition Classes
    NiolOutput
  216. def writeSomeShortsLE(src: Array[Short]): Int

    Writes at most src.length shorts of src for each value.

    Writes at most src.length shorts of src for each value. Uses little-endian for each value. Returns the actual number of shorts written, possibly zero.

    src

    the array to write

    returns

    the number of shorts written

    Definition Classes
    NiolOutput
  217. final def writeString(str: String, charset: Charset = UTF_8): Unit

    Writes a String with the given charset.

    Writes a String with the given charset. The written data isn't prefixed by its length.

    str

    the value to write

    charset

    the charset to encode the String with

    Definition Classes
    NiolOutput
  218. final def writeUUID(uuid: UUID): Unit

    Writes a UUID as two 8-bytes big-endian integers, most significant bits first.

    Writes a UUID as two 8-bytes big-endian integers, most significant bits first.

    uuid

    the value to write

    Definition Classes
    NiolOutput
  219. def writeVarInt(i: Int): Unit

    Writes a variable-length int using the normal/unsigned encoding.

    Writes a variable-length int using the normal/unsigned encoding.

    i

    the value to write

    Definition Classes
    NiolOutput
  220. def writeVarLong(l: Long): Unit

    Writes a variable-length long using the normal/unsigned encoding.

    Writes a variable-length long using the normal/unsigned encoding.

    l

    the value to write

    Definition Classes
    NiolOutput
  221. final def writeVarString(csq: CharSequence, charset: Charset = UTF_8): Unit

    Writes a CharSequence with the given charset, preceded by its length written as a normal VarInt.

    Writes a CharSequence with the given charset, preceded by its length written as a normal VarInt.

    csq

    the value to write

    charset

    the charset to CharSequence the String with

    Definition Classes
    NiolOutput
  222. var writepos: Int
    Attributes
    protected[this]

Inherited from NiolBuffer

Inherited from NiolOutput

Inherited from NiolInput

Inherited from AnyRef

Inherited from Any

Ungrouped