
April 30th, 2003, 01:03 PM
|
|
Junior Member
|
|
Join Date: Apr 2003
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
java IOStream speed for chars
I copied a text file using a FileInputStream and FileOutputStream
and then a FileWriter and a FileReader.When I timed the program,both with and without buffer streams,the Input/output stream took about a quarter of the time the Read/Writer took.
But the book I'm reading says that when dealing with characters you're supposed to use only FileReader and FileWriter.
Why is this so,even when using these is slower?
Also,in Lists and Sets,is there any way of resetting the iterator after you reach the end? I mean,is there anything like 'rewind'?
|