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. thanks for providing information in a simple langu
View Tutorial          By: shailaja at 2010-09-01 03:50:41

2. Hi Jim, to get the code for this clock, right clic
View Tutorial          By: Rajan at 2008-04-11 08:25:03

3. Currently am working in Perl, lik to learn Java, n
View Tutorial          By: KUMARESAN at 2011-12-14 05:08:47

4. hi everybody....

please use comm.j

View Tutorial          By: manoj at 2012-09-24 10:41:34

5. great, thnak you very much !!!!
View Tutorial          By: geek at 2014-05-11 00:10:32

6. Thank you. It is very good.
View Tutorial          By: tapes pra at 2011-12-08 09:23:31

7. i see that lots of people get this exception : jav
View Tutorial          By: oded at 2008-09-28 03:33:33

8. Thanks heaps, I had the file already there but it
View Tutorial          By: Jb at 2009-05-14 08:13:08

9. hi can u send me the complete working code for sen
View Tutorial          By: Brajesh at 2011-04-21 03:07:40

10. Hi, i tried this tutorial with my own database and
View Tutorial          By: Dejan at 2015-03-18 13:06:27