switch back to BufferedInputStream

Fixes #1928

Turns out FlushedInputStream mostly doesn't work, at least not as well as BufferedInputStream. I was able to reproduce this and this change fixes it.

It uses more memory, but at least it works unlike the other claimed solution.