Return to Snippet

Revision: 35431
at November 8, 2010 10:07 by mouseroot


Initial Code
import java.io.*;
import java.util.*;

class ...

public static void main(String args[]) ...

try {

//Read 
Scanner FileI = new Scanner(new FileInputStream("C://path//to//file.ext"));

//Write
Writer FileO = new OutputStreamWriter(new FileOutputStream("C://path//to.ext"));

//Read a line

FileI.nextLine();

//Write a line

FileO.write("");

} catch(IOException ee) {
System.out.println("There was an error " + ee);
}

Initial URL

                                

Initial Description
Read and write to files in java

Initial Title
Read and Write to Files

Initial Tags

                                

Initial Language
Java