Comment on Tutorial - FileReader and FileWriter example program in Java By Tamil Selvan



Comment Added by : Tim

Comment Added at : 2009-10-21 17:31:00

Comment on Tutorial : FileReader and FileWriter example program in Java By Tamil Selvan
Nice example for FileReader and FileWriter,

The FileWriter code needed to be tweeked though,

FileWriter f2 = new FileWriter("file3.txt");
f2.write(buffer,buffer.lengthbuffer.
length/4,buffer.length/4);
f2.close();

The f2.write(buffer,buffer.length/4,buffer.length/4) works
better, I couldn't find a method for FileWriter.write() that took
4 arguments....


View Tutorial



Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. I've tried this code but i am gettting error at li
View Tutorial          By: Iqra at 2012-12-13 10:43:12

2. I used two phrases of the security section for the
View Tutorial          By: pabo at 2010-04-05 05:22:24

3. I deploy a project in apache tomcat and backend to
View Tutorial          By: satish at 2010-08-04 05:31:59

4. Fantastic work guys
View Tutorial          By: wizard at 2012-09-22 04:18:59

5. why push is error in st.push(new Integer(a)); ? an
View Tutorial          By: ann at 2015-02-02 09:23:41

6. but include<iostream> is main function.
View Tutorial          By: glen at 2009-02-03 22:19:22

7. Great stuff - helped me setting up the company SQL
View Tutorial          By: JW at 2011-07-11 12:09:19

8. I could not understand, anyone having an easier ex
View Tutorial          By: aatish at 2011-09-14 09:52:28

9. hi,Very Nice tutorials and iwant to know how to ch
View Tutorial          By: vimala at 2010-07-08 05:05:17

10. Brief but Comprehensive. Excellent Effort.
View Tutorial          By: Farooq at 2011-11-16 14:14:52