"이희승 (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.
> 
> We might be able to enforce such restriction without introducing new
> types.  Let me research a little bit about this and check in the prototype.

Uh-oh.  It's simply impossible due to the two abstract methods in
ByteBuffer - _get() and _set(). :-(

-- 
Trustin Lee - Principal Software Engineer, JBoss, Red Hat
--
what we call human nature is actually human habit
--
http://gleamynode.net/

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to