String.substring() efficiently reuses the underlying char[] within the String object, I'm wondering if there is an immutable container for byte[] arrays that supports a similar kind of efficient reuse of the underlying array.
Extra points if it can handle things like efficient append and prepend. Still extra points if its packaged for Maven.
Anyone know of such a thing?
The most suitable thing that comes into my mind without going outside base SDK are java.nio Buffers, like ByteBuffer
..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With