We can get a BufferedInputStream
by decorating an FileInputStream
. And Channel got from FileInputStream.getChannel
can also read content into a Buffer
.
So, What's the difference between BufferedInputStream
and java.nio.Buffer
? i.e., when should I use BufferedInputStream
and when should I use java.nio.Buffer
and java.nio.Channel
?