Java tutorial
import java.io.FileOutputStream; import java.io.IOException; public class Main { public static void main(String[] args) throws IOException { FileOutputStream fos = new FileOutputStream("C://text.txt"); fos.close(); // try to write into underlying stream fos.write(65); fos.flush(); fos.close(); } }