ByteStringBuilder

org.apache.pekko.util.ByteStringBuilder
final class ByteStringBuilder extends Builder[Byte, ByteString]

A mutable builder for efficiently creating a org.apache.pekko.util.ByteString.

The created ByteString is not automatically compacted.

Attributes

Source
ByteString.scala
Graph
Supertypes
trait Growable[Byte]
trait Clearable
class Object
trait Matchable
class Any
Show all
Self type

Members list

Value members

Concrete methods

def ++=(bytes: ByteString): this.type

Attributes

Source
ByteString.scala
def addAll(bytes: ByteString): this.type

Attributes

Source
ByteString.scala
override def addAll(xs: IterableOnce[Byte]): this.type

Attributes

Definition Classes
Source
ByteString.scala
override def addOne(elem: Byte): this.type

Attributes

Definition Classes
Source
ByteString.scala
def append(bs: ByteString): this.type

Java API: append a ByteString to this builder.

Java API: append a ByteString to this builder.

Attributes

Source
ByteString.scala
def asOutputStream: OutputStream

Directly wraps this ByteStringBuilder in an OutputStream. Write operations on the stream are forwarded to the builder.

Directly wraps this ByteStringBuilder in an OutputStream. Write operations on the stream are forwarded to the builder.

Attributes

Source
ByteString.scala
def clear(): Unit

Attributes

Source
ByteString.scala

Tests whether this ByteStringBuilder is empty.

Tests whether this ByteStringBuilder is empty.

Attributes

Source
ByteString.scala
def length: Int

Attributes

Source
ByteString.scala

Tests whether this ByteStringBuilder is not empty.

Tests whether this ByteStringBuilder is not empty.

Attributes

Source
ByteString.scala
def putByte(x: Byte): this.type

Add a single Byte to this builder.

Add a single Byte to this builder.

Attributes

Source
ByteString.scala
def putBytes(array: Array[Byte]): this.type

Add a number of Bytes from an array to this builder.

Add a number of Bytes from an array to this builder.

Attributes

Source
ByteString.scala
def putBytes(array: Array[Byte], start: Int, len: Int): this.type

Add a number of Bytes from an array to this builder.

Add a number of Bytes from an array to this builder.

Attributes

Source
ByteString.scala
def putDouble(x: Double)(implicit byteOrder: ByteOrder): this.type

Add a single Double to this builder.

Add a single Double to this builder.

Attributes

Source
ByteString.scala
def putDoubles(array: Array[Double])(implicit byteOrder: ByteOrder): this.type

Add a number of Doubles from an array to this builder.

Add a number of Doubles from an array to this builder.

Attributes

Source
ByteString.scala
def putDoubles(array: Array[Double], start: Int, len: Int)(implicit byteOrder: ByteOrder): this.type

Add a number of Doubles from an array to this builder.

Add a number of Doubles from an array to this builder.

Attributes

Source
ByteString.scala
def putFloat(x: Float)(implicit byteOrder: ByteOrder): this.type

Add a single Float to this builder.

Add a single Float to this builder.

Attributes

Source
ByteString.scala
def putFloats(array: Array[Float])(implicit byteOrder: ByteOrder): this.type

Add a number of Floats from an array to this builder.

Add a number of Floats from an array to this builder.

Attributes

Source
ByteString.scala
def putFloats(array: Array[Float], start: Int, len: Int)(implicit byteOrder: ByteOrder): this.type

Add a number of Floats from an array to this builder.

Add a number of Floats from an array to this builder.

Attributes

Source
ByteString.scala
def putInt(x: Int)(implicit byteOrder: ByteOrder): this.type

Add a single Int to this builder.

Add a single Int to this builder.

Attributes

Source
ByteString.scala
def putInts(array: Array[Int])(implicit byteOrder: ByteOrder): this.type

Add a number of Ints from an array to this builder.

Add a number of Ints from an array to this builder.

Attributes

Source
ByteString.scala
def putInts(array: Array[Int], start: Int, len: Int)(implicit byteOrder: ByteOrder): this.type

Add a number of Ints from an array to this builder.

Add a number of Ints from an array to this builder.

Attributes

Source
ByteString.scala
def putLong(x: Long)(implicit byteOrder: ByteOrder): this.type

Add a single Long to this builder.

Add a single Long to this builder.

Attributes

Source
ByteString.scala
def putLongPart(x: Long, n: Int)(implicit byteOrder: ByteOrder): this.type

Add the n least significant bytes of the given Long to this builder.

Add the n least significant bytes of the given Long to this builder.

Attributes

Source
ByteString.scala
def putLongs(array: Array[Long])(implicit byteOrder: ByteOrder): this.type

Add a number of Longs from an array to this builder.

Add a number of Longs from an array to this builder.

Attributes

Source
ByteString.scala
def putLongs(array: Array[Long], start: Int, len: Int)(implicit byteOrder: ByteOrder): this.type

Add a number of Longs from an array to this builder.

Add a number of Longs from an array to this builder.

Attributes

Source
ByteString.scala
def putShort(x: Int)(implicit byteOrder: ByteOrder): this.type

Add a single Short to this builder.

Add a single Short to this builder.

Attributes

Source
ByteString.scala
def putShorts(array: Array[Short])(implicit byteOrder: ByteOrder): this.type

Add a number of Shorts from an array to this builder.

Add a number of Shorts from an array to this builder.

Attributes

Source
ByteString.scala
def putShorts(array: Array[Short], start: Int, len: Int)(implicit byteOrder: ByteOrder): this.type

Add a number of Shorts from an array to this builder.

Add a number of Shorts from an array to this builder.

Attributes

Source
ByteString.scala

Attributes

Source
ByteString.scala
override def sizeHint(len: Int): Unit

Attributes

Definition Classes
Source
ByteString.scala

Inherited methods

final def ++=(elems: IterableOnce[Byte]): Growable.this.type

Attributes

Inherited from:
Growable
final def +=(elem: Byte): Growable.this.type

Attributes

Inherited from:
Growable
def knownSize: Int

Attributes

Inherited from:
Growable

Attributes

Inherited from:
Builder
final def sizeHint(coll: IterableOnce[_], delta: Int = ...): Unit

Attributes

Inherited from:
Builder

Attributes

Inherited from:
Builder

Deprecated and Inherited methods

final def +=(elem1: Byte, elem2: Byte, elems: Byte*): Growable.this.type

Attributes

Deprecated
[Since version 2.13.0] Use `++=` aka `addAll` instead of varargs `+=`; infix operations with an operand of multiple args will be deprecated
Inherited from:
Growable