special characters in file ^@
hi,
i used method tostring to convert a double into string and have written in a file,
while i try to open the file in shell(unix), it shows some special characters as follows,
^@0^@.^@0^@4^@3^@7^@4^@0^@7^@
^@0^@.^@0^@3^@1^@3^@1^@9^@2^@
^@0^@.^@0^@1^@6^@5^@0^@2^@9^@
^@0^@.^@0^@0^@3^@1^@8^@5^@5^@1^@
in between each numbers, when i open the same file in textedit it shows as follows,
0.0655756
0.0976344
also i try to do global substitution using unix commands but shows the message pattern not found.
here's my code what should do to get rid of this trouble,
try{
FileOutputStream fwrite =new FileOutputStream("gridfile.grid");
DataOutputStream dwrite =new DataOutputStream(fwrite);
for(int z=0;z<15;z++){
for(int y=0;y<15;y++){
for(int x= 0;x<15;x++){
doubgrid = Double.toString(filegrid[x][y][z]);
dwrite.writeChars(doubgrid);
dwrite.writeChars("\n");
//System.out.println("raech");
}
}
}
fwrite.close();

