On 04/28/2008 07:56 PM, "이희승 (Trustin Lee) <[EMAIL PROTECTED]>" wrote:
David M. Lloyd wrote:
On 04/28/2008 01:09 PM, Emmanuel Lecharny wrote:
May be but this is just a Buffer, not a data structure ! BB are really
meant to be used as a fixed and temporary storage, not as something a
user application can use at will.
Yes, I think the important change is to break the 1:1 association
between a buffer and a message.
That's what this part of the thread is really all about I think.
Very true. I actually don't care even if we use NIO ByteBuffer as a
underlying storage and build something on top of it. The problem is to
find out how we can protect users from modifying position, limit, mark
and order - these four properties must be handled in our abstraction
layer, which breaks the 1:1 association.
Why must we protect the users from modifying these four properties? If a
user thinks they've got a better way to recombine buffers, why not let them?
I don't see how the byte array interface would be used in practice. Do you
have an example (just a mockup is fine)?
- DML