• Post Reply Bookmark Topic Watch Topic
  • New Topic

Performance with respect to Native Method calls

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
This question is performance improvement with respect to File IO OPerations .
Improve Performance with respect to File IO


This line is taken from some book :

1. FileInputStream read is native method call to the underlying OS , so always use BufferedInputStream read , it doesn't make any native method calls .

Please explain me , how these two method call differs actually ??

Thanks


 
Peter Johnson
author
Bartender
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The statement makes no sense - both methods at some point make native calls to get data from the file. The reason for using the BufferedInputStream is that the data is loaded into a memory buffer in large chunks, with the subsequent calls to the read method getting the next data from the buffer.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your response .
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!