What about buffering FileInputStream?

Posted by Pregzt on Stack Overflow See other posts from Stack Overflow or by Pregzt
Published on 2010-05-21T12:40:47Z Indexed on 2010/05/21 12:50 UTC
Read the original article Hit count: 207

Filed under:
|

I have a piece of code that reads hell of a lot (hundreds of thousand) of relatively small files (couple of KB) from the local file system in a loop. For each file there is a java.io.FileInputStream created to read the content. The process its very slow and take ages.

Do you think that wrapping the FIS into java.io.BufferedInputStream would make a significant difference?

© Stack Overflow or respective owner

Related posts about java

Related posts about file-io