Comment on Tutorial - FileReader and FileWriter example program in Java By Tamil Selvan



Comment Added by : João

Comment Added at : 2012-04-11 19:22:14

Comment on Tutorial : FileReader and FileWriter example program in Java By Tamil Selvan
The actual code to write F2 is:
f2.write(buffer,buffer.length-buffer.length/4,buffer.length/4);
f2.close();

Because here you "say"
Write the buffer.
Starting from buffer.length-buffer.length/4
= 96-(96/4) = 96-24 = 72.
Than it will start after the 72tah char of buffer.

And finally write buffer.length/4 = (24 chars)


View Tutorial



Related Tutorials

Java program to get location meta data from an image

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

Archived Comments

1. thanks a lot ya i got it.................
View Tutorial          By: sruthi at 2013-02-02 08:18:07

2. it is super
View Tutorial          By: vinod at 2011-09-03 04:06:02

3. Thanks a lot. It solved my problem in a second.
View Tutorial          By: Suddy at 2010-03-25 14:56:10

4. Great Job
View Tutorial          By: Niteen Dhule at 2015-02-09 06:37:03

5. thanku this is very good example
View Tutorial          By: priyanka at 2012-10-02 13:08:49

6. Thank you very much. Now I know how to make an abs
View Tutorial          By: Alex at 2011-01-17 03:35:22

7. Thanks mate !!!

-- Anish Sneh

View Tutorial          By: Anish Sneh at 2010-08-18 07:42:56

8. Great stuff!!!

The clickLink functi

View Tutorial          By: Harro at 2008-10-13 07:25:26

9. meow is simple and awesome
View Tutorial          By: vishnu prasanth at 2013-01-10 10:00:35

10. This example has helped me a lot.! kudos to the wr
View Tutorial          By: Disha Sareen at 2014-12-24 09:30:12