• Post Reply Bookmark Topic Watch Topic
  • New Topic

STREAMS QUERIES  RSS feed

 
Deepak Lal
Ranch Hand
Posts: 561
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1> what is the difference between BufferedInputStream and FileReader ?


--
Deepak Lal
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why these two classes in particular? There are actually several fundamental differences between them.
 
Deepak Lal
Ranch Hand
Posts: 561
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i want to know the differences...could you please tell me what they are.?
 
Thomas Thevis
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Deepak Lal,

for starters, streams are meant to access data as raw bytes whereas readers and writers can be used to access data at character level. As the name says, the BufferedInputStream allows buffered access to the bytes of an underlying stream. The FileReader allows reading of characters from a file. However, as Ernest Friedman-Hill stated this is just a small part of differences. The two classes are barely comparable.

Regards,
Thomas
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!