[
https://issues.apache.org/jira/browse/LUCY-266?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Nick Wellnhofer updated LUCY-266:
---------------------------------
Description:
I recently toyed with the idea of reworking Clownfish's ByteBuf in a way
similar to the immutable String changes. This would mean to use a separate
class for immutable byte buffers replacing ViewByteBuf and restrict ByteBuf to
creating byte buffers.
The immutable ByteBuf class could then have a companion iterator class that can
be used to parse a byte buffer's content. All the NumUtils_decode_* functions
could go there, for example.
The NumUtils_encode_* function could be made methods of the mutable ByteBuf.
was:
I recently toyed with the idea of reworking Clownfish's ByteBuf in a way
similar to immutable String changes. This would mean to use a separate class
for immutable byte buffers replacing ViewByteBuf and restrict ByteBuf to
creating byte buffers.
The immutable ByteBuf class could then have a companion iterator class that can
be used to parse a byte buffer's content. All the NumUtils_decode_* functions
could go there, for example.
The NumUtils_encode_* function could be made methods of the mutable ByteBuf.
> Rework ByteBuf
> --------------
>
> Key: LUCY-266
> URL: https://issues.apache.org/jira/browse/LUCY-266
> Project: Lucy
> Issue Type: Task
> Components: Clownfish
> Reporter: Nick Wellnhofer
> Priority: Minor
>
> I recently toyed with the idea of reworking Clownfish's ByteBuf in a way
> similar to the immutable String changes. This would mean to use a separate
> class for immutable byte buffers replacing ViewByteBuf and restrict ByteBuf
> to creating byte buffers.
> The immutable ByteBuf class could then have a companion iterator class that
> can be used to parse a byte buffer's content. All the NumUtils_decode_*
> functions could go there, for example.
> The NumUtils_encode_* function could be made methods of the mutable ByteBuf.
--
This message was sent by Atlassian JIRA
(v6.2#6252)