There’s a common pattern, when each layer of application, dealing with data from a stream tends to wrap it into a BufferedInputStream, so that at a whole, there’s a lot of buffers, filled from buffers, filled from buffers and so on.
I think this is bad practice and want to question: how does it impact the performance? Can this cause bugs?
This is a very general question, but I’d say there are a number of problems with having lots of layers of buffered input streams (in any language).
Just a few thoughts on the matter. I’m sure someone with better Java knowledge could contribute a more detailed analysis.