Why only read() methods in ByteArrayInputStream does not throw IOException?
You are right, read() methods of all other InputStreams throw IOException except ByteArrayInputStream. This is because the entire byte array is in memory; there is no circumstance in which an IOException is possible. However, close() and reset() methods of ByteArrayInputStream still can throw IOException.