You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Sungwon Jung <th...@gmail.com> on 2007/09/05 03:06:23 UTC

change default endian?

Hello. I'm using MINA 1.1.2.

default endian is LITTLE_ENDIAN.

I opened two port in one server.
LITTLE_ENDIAN product use one port.
BIG_ENDIAN product use the other port. (I use other ProtocolCodecFilter)

so, can I change default endian in the other port?
if it's impossible, how can I easy change received
BIG_ENDIAN-ByteBuffer to LITTLE_ENDIAN-ByteBuffer.

Thank you.

Re: change default endian?

Posted by mat <fo...@gmail.com>.
Try this
message.order(ByteOrder.LITTLE_ENDIAN) ;


On 9/5/07, Sungwon Jung <th...@gmail.com> wrote:
>
> ah, sorry. default is BIG_ENDIAN.
> I'm mistake. :-)
>
>
> On 9/5/07, mat <fo...@gmail.com> wrote:
> > I believe Java always uses BIG_ENDIAN. So does underlayer TCP
> communication.
> >
> >
> > On 9/5/07, Sungwon Jung <th...@gmail.com> wrote:
> > >
> > > Hello. I'm using MINA 1.1.2.
> > >
> > > default endian is LITTLE_ENDIAN.
> > >
> > > I opened two port in one server.
> > > LITTLE_ENDIAN product use one port.
> > > BIG_ENDIAN product use the other port. (I use other
> ProtocolCodecFilter)
> > >
> > > so, can I change default endian in the other port?
> > > if it's impossible, how can I easy change received
> > > BIG_ENDIAN-ByteBuffer to LITTLE_ENDIAN-ByteBuffer.
> > >
> > > Thank you.
>

Re: change default endian?

Posted by Sungwon Jung <th...@gmail.com>.
ah, sorry. default is BIG_ENDIAN.
I'm mistake. :-)


On 9/5/07, mat <fo...@gmail.com> wrote:
> I believe Java always uses BIG_ENDIAN. So does underlayer TCP communication.
>
>
> On 9/5/07, Sungwon Jung <th...@gmail.com> wrote:
> >
> > Hello. I'm using MINA 1.1.2.
> >
> > default endian is LITTLE_ENDIAN.
> >
> > I opened two port in one server.
> > LITTLE_ENDIAN product use one port.
> > BIG_ENDIAN product use the other port. (I use other ProtocolCodecFilter)
> >
> > so, can I change default endian in the other port?
> > if it's impossible, how can I easy change received
> > BIG_ENDIAN-ByteBuffer to LITTLE_ENDIAN-ByteBuffer.
> >
> > Thank you.

Re: change default endian?

Posted by mat <fo...@gmail.com>.
I believe Java always uses BIG_ENDIAN. So does underlayer TCP communication.


On 9/5/07, Sungwon Jung <th...@gmail.com> wrote:
>
> Hello. I'm using MINA 1.1.2.
>
> default endian is LITTLE_ENDIAN.
>
> I opened two port in one server.
> LITTLE_ENDIAN product use one port.
> BIG_ENDIAN product use the other port. (I use other ProtocolCodecFilter)
>
> so, can I change default endian in the other port?
> if it's impossible, how can I easy change received
> BIG_ENDIAN-ByteBuffer to LITTLE_ENDIAN-ByteBuffer.
>
> Thank you.
>