Re: how to extend a byte[] array with a null byte?

Discussion in 'Java' started by Patricia Shanahan, Apr 17, 2008.

  1. Rex Mottram wrote:
    > Peter Duniho wrote:
    >> Huh? Just copy the bytes into a new array of the desired length, and
    >> set the last byte as needed.

    >
    > Good point, I should have thought of that. But like you I was expecting
    > to find some kind of helper method.


    System.arraycopy. It's such an important helper method that it was put
    in the API before java.util.Arrays and its helper methods.

    Patricia
     
    Patricia Shanahan, Apr 17, 2008
    #1
    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. Kirby
    Replies:
    3
    Views:
    677
    Kirby
    Oct 8, 2004
  2. Replies:
    5
    Views:
    27,490
    Mike Schilling
    Mar 29, 2006
  3. Tom McGlynn
    Replies:
    4
    Views:
    888
    Mark Space
    Apr 19, 2008
  4. Tom McGlynn
    Replies:
    2
    Views:
    425
    Andreas Leitgeb
    Apr 18, 2008
  5. aneuryzma
    Replies:
    3
    Views:
    780
    Jim Langston
    Jun 16, 2008
Loading...

Share This Page