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. can u explain about printStackTrace()method.what i
View Tutorial          By: himabindu at 2009-06-10 20:03:14

2. hi RAMLAK i am akankshain and getting these erro
View Tutorial          By: akanksha at 2011-12-06 10:15:47

3. It encourage the learners

Learners

View Tutorial          By: sureshkumar p at 2010-12-22 04:13:04

4. hi Emiley J.,
i am geting this error while

View Tutorial          By: jugal at 2009-02-20 02:14:23

5. I dont want my client using my application to do a
View Tutorial          By: zaffa at 2011-07-27 06:52:09

6. hi guys,

i want some

View Tutorial          By: THANGA at 2012-03-19 15:24:38

7. i am getting a force close...can anyone please hel
View Tutorial          By: jack at 2012-03-22 15:18:37

8. Hi there, a nice tutorial. i wanna ask, what about
View Tutorial          By: Alfa at 2013-03-06 04:04:26

9. i thnk exampleThread example is wrong - like billg
View Tutorial          By: oldman at 2011-09-24 12:32:33

10. Good start for me. At least I now know what i am s
View Tutorial          By: eoaddai at 2011-12-23 20:53:35