byte manipulation in Java ?

Discussion in 'Java' started by Ph. Barthelemy, Sep 1, 2004.

  1. 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
     
    Ph. Barthelemy, Sep 1, 2004
    #1
    1. Advertising

  2. Ph. Barthelemy

    Axl Guest

    Axl, Sep 1, 2004
    #2
    1. Advertising

  3. Ph. Barthelemy

    Chris Uppal Guest

    Ph. Barthelemy wrote:

    > 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
     
    Chris Uppal, Sep 2, 2004
    #3
  4. OK, well, I hope the move over 1.5 will be quick.

    thanks everyone for your answers...

    --P

    "Chris Uppal" <-THIS.org> wrote in message news:<>...
    > Ph. Barthelemy wrote:
    >
    > > 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
     
    Ph. Barthelemy, Sep 2, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andreas
    Replies:
    1
    Views:
    853
    Jonathan Bromley
    May 4, 2004
  2. Bharat Bhushan

    Appending byte[] to another byte[] array

    Bharat Bhushan, Aug 5, 2003, in forum: Java
    Replies:
    15
    Views:
    40,256
    Roedy Green
    Aug 5, 2003
  3. Replies:
    2
    Views:
    767
    Dave Monroe
    Sep 2, 2004
  4. Niv (KP)

    byte data manipulation

    Niv (KP), Apr 25, 2009, in forum: C Programming
    Replies:
    14
    Views:
    927
    Flash Gordon
    May 4, 2009
  5. Niv (KP)

    Re: byte data manipulation

    Niv (KP), Apr 27, 2009, in forum: C Programming
    Replies:
    2
    Views:
    301
    James Kuyper
    Apr 27, 2009
Loading...

Share This Page