Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

different betwean InputStream and FileInputStream  RSS feed

 
sam liya
Ranch Hand
Posts: 1246
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the different betwean InputStream and FileInputStream?
why we use FileInputStream for Deserilization than InputStream
 
Rob Spoor
Sheriff
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A FileInputStream is a specialized InputStream that only works with files.

InputStream itself is more general - besides FileInputStream, you can also retrieve InputStreams to read from URLs (through java.net.URL and java.net.URLConnection), databases (through java.sql.ResultSet), or in theory every source of data.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!