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



Ask a Question

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 and easy to understand.....impressive logic
View Tutorial          By: Dj at 2009-11-26 13:33:34

2. Including the required mail properties should solv
View Tutorial          By: Rajesh Vaddi at 2011-12-13 23:55:15

3. javax.comm.NoSuchPortException
at javax.co

View Tutorial          By: Prakash at 2008-04-14 06:22:38

4. Explanation was good and easily comprehendable.
View Tutorial          By: Moin Adil at 2009-06-17 04:18:56

5. Please some one send me the 6th program developed
View Tutorial          By: mounika at 2008-04-25 02:49:56

6. Why not a simple array list of threads?
wha

View Tutorial          By: Ranadheer Machineni at 2011-08-18 12:30:35

7. input can be taken simly with Console class

View Tutorial          By: Dinesh at 2012-06-29 11:18:23

8. I got error during using above code if There is ne
View Tutorial          By: Sunil at 2009-12-28 05:22:45

9. Thanks...

Rohit
xpode.com

View Tutorial          By: Rohit at 2012-04-30 04:18:12

10. sir i am mca student. i can choose my flatform is
View Tutorial          By: sridevi at 2012-06-06 10:21:39