+ 3
what is the difference between ByteArrayInputStream class and BufferedInputStream class?
(since both use buffer memory).
1 Answer
+ 2
You might be seeing the constructor for ByteArrayInputStream, which is an InputStream that reads through a byte[] so does no actual I/O. If you are reading through your byte[] byte by byte then you will probably find using a BufferedInputStream or ByteArrayInputStream simplifies your code at some performance cost. (Note don't mix using BufferedInputStream with using the underlying stream, because the former buffers.