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 and appendUnsafe separately, e.g.
callign ensureLength once before appendUnsafe-ing multiple Chars
- It provides fast methods like makeString or writeOutToIfLongerThan, that
let you push the data elsewhere with minimal unnecessary copying
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