BufferedOutputStream: write(int i) : BufferedOutputStream « java.io « Java by API






BufferedOutputStream: write(int i)

  
/*
 * Output:
 */

import java.io.BufferedOutputStream;
import java.io.FileOutputStream;

public class MainClass {

  public static void main(String args[]) {

    try {

      FileOutputStream fos = new FileOutputStream(args[0]);

      BufferedOutputStream bos = new BufferedOutputStream(fos);

      for (int i = 0; i < 12; i++) {
        bos.write(i);
      }

      bos.close();
    } catch (Exception e) {
      System.out.println("Exception: " + e);
    }
  }
}
           
         
    
  








Related examples in the same category

1.new BufferedOutputStream(OutputStream out)
2.BufferedOutputStream: write(byte[] b, int off, int len)