Sure.  As you see ByteArrayIterator in my prototype, we can simply add
order method there.

Thanks,

Steve Ulrich wrote:
> Hi!
> 
> There's one thing more to point out: The byte order
> We're parsing messages from devices that are forwarded by a "gateway" to our 
> servers. The gateway speaks big endian, while the device itselfs speaks 
> little endian so we have to switch the byte order while parsing. The 
> ByteBuffer solution is very nice for this, just a 
> buf.order(ByteBuffer.LITTLE_ENDIAN); is enough.
> 
> regards
> 
> Steve
> 
> Trustin Lee wrote:
> 
>> -----Ursprüngliche Nachricht-----
>> Von: "이희승 (Trustin Lee) [mailto:[EMAIL PROTECTED]
>> Gesendet: Dienstag, 29. April 2008 10:50
>> An: [email protected]
>> Betreff: Re: A quick prototyping of ByteArray interface
>>
>> Julien Vermillard wrote:
>>> No get/set for other types than bytes ?
>> I think we should have get/set for all integer primitive types if we
>> are going to implement CompositeByteArray.
>>
>> For other types, we can choose one of the following:
>>
>> 1) Provide an AbstractByteArray which provides the default
>> implementation of all the utility getters and setters - this is what we
>> are doing right now.
>>
>> 2) Provide a utility class which is composed of many utility methods
>> and use static imports.  For example:
>>
>>     import static org.apache.mina.array.ArrayUtils.*;
>>     String s = getPrefixedString(array)
>>
>> It seems like the second approach is gaining popularity recently in the
>> mailing list.  I'd like to know what others think about this change
>> though.
>> --
>> Trustin Lee - Principal Software Engineer, JBoss, Red Hat
>> --
>> what we call human nature is actually human habit
>> --
>> http://gleamynode.net/
> 

-- 
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