Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor the Buffer package #98

Open
3 tasks
jonbo372 opened this issue Nov 26, 2018 · 0 comments
Open
3 tasks

Refactor the Buffer package #98

jonbo372 opened this issue Nov 26, 2018 · 0 comments

Comments

@jonbo372
Copy link
Collaborator

jonbo372 commented Nov 26, 2018

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@#$
@jonbo372 jonbo372 changed the title 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. Refactor the Buffer package Nov 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant