CharBuilder
upickle.core.CharBuilder
class CharBuilder(startSize: Int) extends CharAppendC
A fast buffer that can be used to store Chars (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 Chars - 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