Java tutorial
import java.io.FileOutputStream; import java.io.FilterOutputStream; import java.io.OutputStream; public class Main { public static void main(String[] args) throws Exception { // create input streams OutputStream os = new FileOutputStream("C://test.txt"); FilterOutputStream fos = new FilterOutputStream(os); // releases any system resources associated with the stream fos.close(); // writes byte to the output stream fos.write(65); } }