View Single Post
  #2 (permalink)  
Old 11-01-2007, 02:29 PM
Turtle Turtle is offline
Member
 
Join Date: Nov 2007
Posts: 4
Turtle is on a distinguished road
Hi Unhurt,

FileReader (Java Platform SE 6)

Quote:
Convenience class for reading character files. The constructors of this class assume that the default character encoding and the default byte-buffer size are appropriate. To specify these values yourself, construct an InputStreamReader on a FileInputStream.

FileReader is meant for reading streams of characters. For reading streams of raw bytes, consider using a FileInputStream.

FileInputStream (Java Platform SE 6)

Quote:
A FileInputStream obtains input bytes from a file in a file system. What files are available depends on the host environment.

FileInputStream is meant for reading streams of raw bytes such as image data. For reading streams of characters, consider using FileReader.
I would recommend using JTextArea for using displaying editable text.

To better understand the purpose, pro's and con's of each stream: Lesson: Basic I/O (The Java™ Tutorials > Essential Classes)
Reply With Quote