Refactor Buffer package. Have better support for the most commonly used type, which is a direct byte[] array type of Buffer. Also, create better support and structure for ReadOnlyBuffer and ImmutableBuffers.
[ ] New structure for buffers. May have Buffer, followed by StreamingBuffer and DirectBuffer, and variants of those for ReadOnly and perhaps even Immutable. This to better support the protocol packages that makes use of the immutable concept (the SIP & soon the Diameter implementation does this)
[ ] Clean-up some of the checked exceptions, such as IOException when reading, getting etc. It is just annoying since most of the times the buffer you may be using is a backed by a byte-array so there is no way you can have an IOException being thrown in the first place anyway... yet another early mistake of mine!
[ ] Ensure that all operations on e.g. a ReadOnlyBuffer will return the same so we don't have to cast all the freaking time. E.g. slice currently returns a Buffer so even though you do that operation on a ReadOnlyBuffer you will get back a Buffer that you have to cast. Annoying as s@#$
Refactor Buffer package. Have better support for the most commonly used type, which is a direct byte[] array type of Buffer. Also, create better support and structure for ReadOnlyBuffer and ImmutableBuffers.
StreamingBuffer
andDirectBuffer
, and variants of those forReadOnly
and perhaps evenImmutable
. This to better support the protocol packages that makes use of the immutable concept (the SIP & soon the Diameter implementation does this)IOException
when reading, getting etc. It is just annoying since most of the times the buffer you may be using is a backed by a byte-array so there is no way you can have anIOException
being thrown in the first place anyway... yet another early mistake of mine!ReadOnlyBuffer
will return the same so we don't have to cast all the freaking time. E.g.slice
currently returns aBuffer
so even though you do that operation on aReadOnlyBuffer
you will get back aBuffer
that you have to cast. Annoying as s@#$