c

akka.util

ByteStringBuilder

final class ByteStringBuilder extends Builder[Byte, ByteString]

A mutable builder for efficiently creating a akka.util.ByteString.

The created ByteString is not automatically compacted.

Self Type
ByteStringBuilder
Source
ByteString.scala
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ByteStringBuilder
  2. Builder
  3. Growable
  4. Clearable
  5. AnyRef
  6. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new ByteStringBuilder()

Value Members

  1. def ++=(bytes: ByteString): ByteStringBuilder.this.type
  2. final def ++=(elems: IterableOnce[Byte]): ByteStringBuilder.this.type
    Definition Classes
    Growable
    Annotations
    @inline()
  3. final def +=(elem: Byte): ByteStringBuilder.this.type
    Definition Classes
    Growable
    Annotations
    @inline()
  4. def addAll(xs: IterableOnce[Byte]): ByteStringBuilder.this.type
    Definition Classes
    ByteStringBuilder → Growable
  5. def addAll(bytes: ByteString): ByteStringBuilder.this.type
  6. def addOne(elem: Byte): ByteStringBuilder.this.type
    Definition Classes
    ByteStringBuilder → Growable
  7. def append(bs: ByteString): ByteStringBuilder.this.type

    Java API: append a ByteString to this builder.

  8. def asOutputStream: OutputStream

    Directly wraps this ByteStringBuilder in an OutputStream.

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

  9. def clear(): Unit
    Definition Classes
    ByteStringBuilder → Builder → Clearable
  10. def isEmpty: Boolean

    Tests whether this ByteStringBuilder is empty.

  11. def knownSize: Int
    Definition Classes
    Growable
  12. def length: Int
  13. def mapResult[NewTo](f: (ByteString) => NewTo): Builder[Byte, NewTo]
    Definition Classes
    Builder
  14. def nonEmpty: Boolean

    Tests whether this ByteStringBuilder is not empty.

  15. def putByte(x: Byte): ByteStringBuilder.this.type

    Add a single Byte to this builder.

  16. def putBytes(array: Array[Byte], start: Int, len: Int): ByteStringBuilder.this.type

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

  17. def putBytes(array: Array[Byte]): ByteStringBuilder.this.type

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

  18. def putDouble(x: Double)(implicit byteOrder: ByteOrder): ByteStringBuilder.this.type

    Add a single Double to this builder.

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

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

  20. def putDoubles(array: Array[Double])(implicit byteOrder: ByteOrder): ByteStringBuilder.this.type

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

  21. def putFloat(x: Float)(implicit byteOrder: ByteOrder): ByteStringBuilder.this.type

    Add a single Float to this builder.

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

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

  23. def putFloats(array: Array[Float])(implicit byteOrder: ByteOrder): ByteStringBuilder.this.type

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

  24. def putInt(x: Int)(implicit byteOrder: ByteOrder): ByteStringBuilder.this.type

    Add a single Int to this builder.

  25. def putInts(array: Array[Int], start: Int, len: Int)(implicit byteOrder: ByteOrder): ByteStringBuilder.this.type

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

  26. def putInts(array: Array[Int])(implicit byteOrder: ByteOrder): ByteStringBuilder.this.type

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

  27. def putLong(x: Long)(implicit byteOrder: ByteOrder): ByteStringBuilder.this.type

    Add a single Long to this builder.

  28. def putLongPart(x: Long, n: Int)(implicit byteOrder: ByteOrder): ByteStringBuilder.this.type

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

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

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

  30. def putLongs(array: Array[Long])(implicit byteOrder: ByteOrder): ByteStringBuilder.this.type

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

  31. def putShort(x: Int)(implicit byteOrder: ByteOrder): ByteStringBuilder.this.type

    Add a single Short to this builder.

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

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

  33. def putShorts(array: Array[Short])(implicit byteOrder: ByteOrder): ByteStringBuilder.this.type

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

  34. def result(): ByteString
    Definition Classes
    ByteStringBuilder → Builder
  35. def sizeHint(len: Int): Unit
    Definition Classes
    ByteStringBuilder → Builder
  36. final def sizeHint(coll: IterableOnce[_], delta: Int): Unit
    Definition Classes
    Builder
  37. final def sizeHintBounded(size: Int, boundingColl: Iterable[_]): Unit
    Definition Classes
    Builder

Deprecated Value Members

  1. final def +=(elem1: Byte, elem2: Byte, elems: Byte*): ByteStringBuilder.this.type
    Definition Classes
    Growable
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.13.0) Use ++= aka addAll instead of varargs +=; infix operations with an operand of multiple args will be deprecated