/***** Code de MesExemples.com *******/
import java.io.DataOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
class WriteLongToFile {
public static void main(String[] args) {
String strFilePath = "C://test.txt";
try
{
FileOutputStream fout = new FileOutputStream(strFilePath);
DataOutputStream dos = new DataOutputStream(fout);
long l = 65;
dos.writeLong(l);
dos.close();
}
catch (IOException e)
{
System.out.println("IOException : " + e);
}
}
}