Reuse IOUtils.consume() which also avoids a PMD empty loop body error.
@@ -169,10 +169,7 @@ public void close() throws IOException {
* @throws IOException The underlying {@link InputStream}, or either of the observers has thrown an exception.
*/
public void consume() throws IOException {
- final byte[] buffer = IOUtils.byteArray();
- while (read(buffer) != EOF) {
- // empty
- }
+ IOUtils.consume(this);
}
/**
