Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 330
Registered: ‎02-25-2009
My Device: Not Specified

big or little endian?

Hello,

 

Blackberry supports which endianess??

 

i mean what its is? little endian or big endian?

 

Thanks in advance

Developer
Posts: 696
Registered: ‎12-02-2008
My Device: Not Specified

Re: big or little endian?

Hi,

 

Not getting what you are asking can you explain little more what exactly "endian" means

Regards,
Rajat Gupta.
--------------------------------------------------------------------------------
If your problem was get solved then please mark the thread as "Accepted solution" and kudos - your wish
Developer
Posts: 330
Registered: ‎02-25-2009
My Device: Not Specified

Re: big or little endian?

how it stores bytes?

in the form of little endian or in big endian

Developer
Posts: 19,631
Registered: ‎07-14-2008
My Device: Not Specified

Re: big or little endian?

[ Edited ]

Don't think Java will let you know which way round this is.  You can't read/write into a short, int or long variable so you shouldn't care anyway.  Why do you want to know?

 

Edit: Fixed a typo.

Message Edited by peter_strange on 03-19-2009 01:53 PM
Developer
Posts: 330
Registered: ‎02-25-2009
My Device: Not Specified

Re: big or little endian?

i am asking because i am going to play (work) with bytes.. so just wanted to confirm is there something hard n core endianess.
Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: big or little endian?

It is not typical to worry about this in Java. However, you would need to know it if you are importing serialized integer data from another platform - but you would only need to know the endianess form the other platform. it is possible to convert this data (once you know how it was stored) without knowing how your Java platform stores the bytes.

 

The term "endian" is from Gullivers Travels. There were two groups of folks (Lilliputians) at war with each other: one group cracked their eggs form the little end, the other from the big end. hence "little endian" and "big endian".

 

In short, the term refers to byte or bit-order within a native integer type.

 

http://en.wikipedia.org/wiki/Endianness

 

Developer
Posts: 19,631
Registered: ‎07-14-2008
My Device: Not Specified

Re: big or little endian?

Gullivers Travels!  Always wondered.  You learn something every day!  Thanks RexDoug.
Contributor
Posts: 17
Registered: ‎07-23-2010
My Device: Blackberry Storm 9530
My Carrier: Verizon

Re: big or little endian?

Pete,

 

I have this in C Sharp:

 

mybytearray.ToString("x2");

 

What's the Equivelent in Java Micro on Blackberry?

Thanks

David

 

 

Developer
Posts: 1,806
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.3253, Z10 (STL100-3)-10.3.1.2576, Z30 (STA100-5)-10.3.1.2582, Passport (SQW100-1)-10.3.1.2576, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: big or little endian?

Please don't hijack a post. Especially an old one. Please make a new one.

Also, take a look at ByteArrayUtilities (OS 6.0 and higher).
---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.