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.
- 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
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- Implicit
- This member is added by an implicit conversion from ByteStringBuilder toany2stringadd[ByteStringBuilder] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
- def ++=(bytes: ByteString): ByteStringBuilder.this.type
- final def ++=(xs: IterableOnce[Byte]): ByteStringBuilder.this.type
- Definition Classes
- Growable
- Annotations
- @inline()
- final def +=(elem: Byte): ByteStringBuilder.this.type
- Definition Classes
- Growable
- Annotations
- @inline()
- def ->[B](y: B): (ByteStringBuilder, B)
- Implicit
- This member is added by an implicit conversion from ByteStringBuilder toArrowAssoc[ByteStringBuilder] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- 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.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- 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 clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def ensuring(cond: (ByteStringBuilder) => Boolean, msg: => Any): ByteStringBuilder
- Implicit
- This member is added by an implicit conversion from ByteStringBuilder toEnsuring[ByteStringBuilder] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: (ByteStringBuilder) => Boolean): ByteStringBuilder
- Implicit
- This member is added by an implicit conversion from ByteStringBuilder toEnsuring[ByteStringBuilder] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean, msg: => Any): ByteStringBuilder
- Implicit
- This member is added by an implicit conversion from ByteStringBuilder toEnsuring[ByteStringBuilder] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean): ByteStringBuilder
- Implicit
- This member is added by an implicit conversion from ByteStringBuilder toEnsuring[ByteStringBuilder] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def fillArray(len: Int)(fill: (Array[Byte], Int) => Unit): ByteStringBuilder.this.type
- Attributes
- protected
- final def fillByteBuffer(len: Int, byteOrder: ByteOrder)(fill: (ByteBuffer) => Unit): ByteStringBuilder.this.type
- Attributes
- protected
- Annotations
- @inline()
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def isEmpty: Boolean
Tests whether this ByteStringBuilder is empty.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def knownSize: Int
- Definition Classes
- Growable
- def length: Int
- def mapResult[NewTo](f: (ByteString) => NewTo): Builder[Byte, NewTo]
- Definition Classes
- Builder
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nonEmpty: Boolean
Tests whether this ByteStringBuilder is not empty.
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- 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
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
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
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated @Deprecated
- Deprecated
- def formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from ByteStringBuilder toStringFormat[ByteStringBuilder] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.12.16) Use
formatString.format(value)
instead ofvalue.formatted(formatString)
, or use thef""
string interpolator. In Java 15 and later,formatted
resolves to the new method in String which has reversed parameters.
- def →[B](y: B): (ByteStringBuilder, B)
- Implicit
- This member is added by an implicit conversion from ByteStringBuilder toArrowAssoc[ByteStringBuilder] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use
->
instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.