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. from docs api api/java/awt/Frame/setOpacity:

View Tutorial          By: robert at 2014-12-12 07:48:59

2. i want to open pdf file from sd card and i dont wa
View Tutorial          By: Karan Mavadhiya at 2013-01-30 12:02:30

3. it's very helpful for java beginner. thanks
View Tutorial          By: Pisal at 2012-12-03 05:00:54

4. Everything is running.... But it doesn't send....
View Tutorial          By: Amirtharaj at 2009-04-14 05:26:26

5. Thanks for the above code. I am not sure whether t
View Tutorial          By: Koolkabin at 2010-08-20 01:11:27

6. i want every important questions in .net 3.5 and j
View Tutorial          By: pawan at 2011-07-28 06:17:25

7. I've been satisfied with your tutorial site. Since
View Tutorial          By: Mark Harold F. Manguino at 2008-08-06 05:00:54

8. this is a site site for our problem to be sorted o
View Tutorial          By: Atique at 2009-11-02 00:15:18

9. hi,
i have tried to download the sun api fr

View Tutorial          By: raghu at 2009-01-07 05:45:33

10. Hi guys... I try to run the program and I got this
View Tutorial          By: Glatiuden at 2015-01-31 02:42:37