byte manipulation in Java ?

P

Ph. Barthelemy

Hi,

I am looking a byte manipulation library in Java ( with functions such
as get the MSB, the LSB, decode/encode a Binary-coded decimal, etc...
for the various Java data types ).

I did not find anything included in J2se 1.4.
Is there a well-known library to do this ? or should rewrite my own
from scratch ( not very difficult, not very satisfying either to
reinvent the wheel... )

TIA,
--Philippe
 
C

Chris Uppal

Ph. Barthelemy said:
I am looking a byte manipulation library in Java ( with functions such
as get the MSB, the LSB, decode/encode a Binary-coded decimal, etc...
for the various Java data types ).

I just happened to notice this is the JDK1.5 change list:

=============
The wrapper classes (Integer, Long, Short, Byte, and Char) now support common
bit manipulation operations which include highestOneBit, lowestOneBit,
numberOfLeadingZeros, numberOfTrailingZeros, bitCount, rotateLeft, rotateRight,
reverse, signum, and reverseBytes.
=============

Might help.

-- chris
 
P

Ph. Barthelemy

OK, well, I hope the move over 1.5 will be quick.

thanks everyone for your answers...

--P
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top