We would like to know how to write byte to a file.
import java.io.FileOutputStream; /*from w w w . j a v a 2s. c o m*/ public class Main { public static void main(String[] args) throws Exception { FileOutputStream fos = new FileOutputStream("C:/demo.txt"); byte b = 01; fos.write(b); fos.close(); } }