ByteBuilder
upickle.core.ByteBuilder
class ByteBuilder(startSize: Int) extends ByteAppendC
A fast buffer that can be used to store Bytes (Bytes or Chars).
Generally faster than the equivalent StringBuilder or java.io.ByteArrayOutputStream, since:
- It is specialized and without the overhead of polymorphism or synchronization.
- It allows the user to call
ensureLength
andappendUnsafe
separately, e.g. callignensureLength
once beforeappendUnsafe
-ing multiple Bytes - It provides fast methods like makeString or writeOutToIfLongerThan, that let you push the data elsewhere with minimal unnecessary copying
Attributes
- Graph
-
- Supertypes
Members list
In this article