File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Android Security Essentials Live Lessons
this week in the
Java in General
Integer converts to 2 octet integer?
Joined: Jan 03, 2008
Feb 01, 2008 09:29:00
I have a requirement that goes something like this:
- Integer should be transmitted in 1, 2, or 4 octet. Integers lager than 1 octet is transmitted with the least significant octet first.
- Example, integer 123 (007b hexadecimal) will be transmitted in a 2 octet integer as follows:
(Binary) 0111 1011 0000 0000
(Hex) 7 B 0 0
So how do I actually convert 123 to 2 octet integer in Java?
Put it in an array byte? An example would be much appreciated.
Joined: Feb 02, 2008
Feb 02, 2008 07:26:00
This this link
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
subject: Integer converts to 2 octet integer?
How this output is coming regarding left shift operator
Question from Khalidmughal for >>> operator
Shift operators !
left shift operation
Integers near zero
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014