java.io.InputStream subclasses are forced to reimplement int read() but are not forced to reimplement read(byte[],int,int). If read(byte[],int,int) is not overwritten, the default implementation in java.io.InputStream repeatedly calls read() but most InputStream implementations could do much better by reading multiple bytes at a time.
There is an existing rule which is similar to this but for the write() method in OutputStream implementations (squid S4349).
External references: https://errorprone.info/bugpattern/InputStreamSlowMultibyteRead
type : Code Smell ?
tags: performance