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
- Alphabetic
- By Inheritance
- ByteStringBuilder
- Builder
- Growable
- Clearable
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new ByteStringBuilder()
Value Members
- def ++=(bytes: ByteString): ByteStringBuilder.this.type
- final def ++=(elems: IterableOnce[Byte]): ByteStringBuilder.this.type
- Definition Classes
- Growable
- Annotations
- @inline()
- final def +=(elem: Byte): ByteStringBuilder.this.type
- Definition Classes
- Growable
- Annotations
- @inline()
- def addAll(xs: IterableOnce[Byte]): ByteStringBuilder.this.type
- Definition Classes
- ByteStringBuilder → Growable
- def addAll(bytes: ByteString): ByteStringBuilder.this.type
- def addOne(elem: Byte): ByteStringBuilder.this.type
- Definition Classes
- ByteStringBuilder → Growable
- def append(bs: ByteString): ByteStringBuilder.this.type
Java API: append a ByteString to this builder.
- 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.
- def clear(): Unit
- Definition Classes
- ByteStringBuilder → Builder → Clearable
- def isEmpty: Boolean
Tests whether this ByteStringBuilder is empty.
- def knownSize: Int
- Definition Classes
- Growable
- def length: Int
- def mapResult[NewTo](f: (ByteString) => NewTo): Builder[Byte, NewTo]
- Definition Classes
- Builder
- def nonEmpty: Boolean
Tests whether this ByteStringBuilder is not empty.
- def putByte(x: Byte): ByteStringBuilder.this.type
Add a single Byte to this builder.
- def putBytes(array: Array[Byte], start: Int, len: Int): ByteStringBuilder.this.type
Add a number of Bytes from an array to this builder.
- def putBytes(array: Array[Byte]): ByteStringBuilder.this.type
Add a number of Bytes from an array to this builder.
- def putDouble(x: Double)(implicit byteOrder: ByteOrder): ByteStringBuilder.this.type
Add a single Double to this builder.
- 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.
- def putDoubles(array: Array[Double])(implicit byteOrder: ByteOrder): ByteStringBuilder.this.type
Add a number of Doubles from an array to this builder.
- def putFloat(x: Float)(implicit byteOrder: ByteOrder): ByteStringBuilder.this.type
Add a single Float to this builder.
- 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.
- def putFloats(array: Array[Float])(implicit byteOrder: ByteOrder): ByteStringBuilder.this.type
Add a number of Floats from an array to this builder.
- def putInt(x: Int)(implicit byteOrder: ByteOrder): ByteStringBuilder.this.type
Add a single Int to this builder.
- 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.
- def putInts(array: Array[Int])(implicit byteOrder: ByteOrder): ByteStringBuilder.this.type
Add a number of Ints from an array to this builder.
- def putLong(x: Long)(implicit byteOrder: ByteOrder): ByteStringBuilder.this.type
Add a single Long to this builder.
- 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. - 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.
- def putLongs(array: Array[Long])(implicit byteOrder: ByteOrder): ByteStringBuilder.this.type
Add a number of Longs from an array to this builder.
- def putShort(x: Int)(implicit byteOrder: ByteOrder): ByteStringBuilder.this.type
Add a single Short to this builder.
- 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.
- def putShorts(array: Array[Short])(implicit byteOrder: ByteOrder): ByteStringBuilder.this.type
Add a number of Shorts from an array to this builder.
- def result(): ByteString
- Definition Classes
- ByteStringBuilder → Builder
- def sizeHint(len: Int): Unit
- Definition Classes
- ByteStringBuilder → Builder
- final def sizeHint(coll: IterableOnce[_], delta: Int): Unit
- Definition Classes
- Builder
- final def sizeHintBounded(size: Int, boundingColl: Iterable[_]): Unit
- Definition Classes
- Builder
Deprecated Value Members
- final def +=(elem1: Byte, elem2: Byte, elems: Byte*): ByteStringBuilder.this.type
- Definition Classes
- Growable
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.13.0) Use
++=
akaaddAll
instead of varargs+=
; infix operations with an operand of multiple args will be deprecated