File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes copying slices of arrays Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "copying slices of arrays" Watch "copying slices of arrays" New topic
Author

copying slices of arrays

Pho Tek
Ranch Hand

Joined: Nov 05, 2000
Posts: 761

I have two byte arrays.

I would like to copy the 1st 8 bytes from source to target.
Is there any util class that does that automatically - rather
than me doing:

Thanks
G


Regards,

Pho
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Don't know if it's exactly what you want, but have you seen java.lang.System.arrayCopy()?
Dave
(oh well, I tried. UBB doesn't like links to methods in the Java API)
[This message has been edited by David O'Meara (edited December 11, 2001).]
Pho Tek
Ranch Hand

Joined: Nov 05, 2000
Posts: 761

Yes that's what I need. Thanks David.
Pho
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: copying slices of arrays
 
Similar Threads
How to create png image with the pixels array?
Int array to 3D array
Creating an IndexColorModel with 8 Colours
Standard DES?
byte array of byte arrays.