Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_java_server thread: Fast File I/O


Message #1 by Deepak Kapur <kapur_deepak@y...> on Wed, 17 Oct 2001 03:06:26 -0700 (PDT)
Hi,

try this,

double your_data_double_array = ; // this will holds your double data array

byte byte_array = new byte[your_data_double_array.length]

Double temp_dbl_variable = null;

for(int i=0;i<your_data_double_array.length;i++){

      temp_dbl_variable = new Double(your_data_double_array[i]);

       byte_array[i] = temp_dbl_variable.byteValue();

        temp_dbl_variable = null;

}

use that byte array to write into file, while reading read into a 
byte array and make a object of Byte for each byte value get the 
double value by calling .doubleValue() method on Byte varible

let me know weather it works or not

Thanks,

Ravi 

  Return to Index