Java examples for File Path IO:FileOutputStream
Create DataOutputStream from FileOutputStream
import java.io.DataOutputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; public class Main { public static void main(String[] args) { //from www . j av a 2 s.c o m String strFilePath = "C://Folder//demo.txt"; try { FileOutputStream fos = new FileOutputStream(strFilePath); DataOutputStream dos = new DataOutputStream(fos); } catch(FileNotFoundException fe) { System.out.println("FileNotFoundException : " + fe); } } }