FileOutputStream: getFD() : FileOutputStream « java.io « Java by API






FileOutputStream: getFD()

 
import java.io.FileDescriptor;
import java.io.FileOutputStream;

public class Main {
  public static void main(String[] argv) throws Exception {
    FileOutputStream os = new FileOutputStream("outfilename");
    FileDescriptor fd = os.getFD();
    os.write(1);
    os.flush();
    fd.sync();
  }
}

   
  








Related examples in the same category

1.new FileOutputStream(File file)
2.new FileOutputStream(String name)
3.FileOutputStream: getChannel()
4.FileOutputStream: write(int b)