Link to home
Start Free TrialLog in
Avatar of byang
byangFlag for United States of America

asked on

little endian/big endian problem

How can I tell if the host is little endian or big endian ? Also, does Java have byte-swap, ntoh(), and hton() functions ?
Avatar of byang
byang
Flag of United States of America image

ASKER

Edited text of question
Avatar of bogamo
bogamo

You shouldn't have to worry about endianness...  Java is the same across all platforms..

When using java to talk to non-java however, I just use my friends >>, <<, and &. (bitwise and and shift)
Avatar of byang

ASKER

I have to parse a binary file, so I really need to worry about it. It's for the same reason you call ntoh() and hton() when doing socket programming.
ASKER CERTIFIED SOLUTION
Avatar of mnelson051997
mnelson051997

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial