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. why push is error in st.push(new Integer(a)); ? an
View Tutorial          By: ann at 2015-02-02 09:23:41

2. Thanks.. grt example
Also... If the type ar

View Tutorial          By: Shahid at 2011-12-20 10:26:22

3. hi,good afternoon i have one problem with spinner
View Tutorial          By: veera reddy at 2012-01-13 06:55:24

4. examples are very use full
View Tutorial          By: keerthe at 2010-08-12 23:00:21

5. I have loaded allthe 5 java files.But how to imple
View Tutorial          By: devi at 2008-04-01 01:02:28

6. thanks emily, this was fantastic... just saved me
View Tutorial          By: philip at 2010-04-10 20:39:08

7. Thanx u m at lab..n u made me complete my prog!
View Tutorial          By: Liza at 2009-12-09 23:03:51

8. Very precisely and simply explained.
View Tutorial          By: Deepak at 2015-01-05 08:37:01

9. Hi all people...If i need to read a sms from the m
View Tutorial          By: Omarsi12 at 2009-09-06 17:11:15

10. i have using struts tag in jsp ,
i have us

View Tutorial          By: sachin khatode at 2008-11-11 01:24:33