array casting

hello there

im quite new to java and i need to write an array of short[][][] to file. the function enables me only to write array of byte[].
so i need to do array casting. i do not wish to make another array and move the data to it using loops because creating another array takes more space and copying through loops by parts of 1 byte each takes more time then copying the entire array at once.

can anyone help please?

thanks

dolev

Comments

  • : hello there
    :
    : im quite new to java and i need to write an array of short[][][] to file. the function enables me only to write array of byte[].
    : so i need to do array casting. i do not wish to make another array and move the data to it using loops because creating another array takes more space and copying through loops by parts of 1 byte each takes more time then copying the entire array at once.
    :
    : can anyone help please?
    :
    : thanks
    :
    : dolev
    :
    Type-casting of an array is not possible, because the array variable in Java is only a reference to the actual array data. The only way to write your own methods for storing and retrieving that array.
  • )-:

    thanks anyway...


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories