in src/main/java/org/apache/commons/io/output/ByteArrayOutputStream.java [136:150]
public void write(final byte[] b, final int off, final int len) {
if (off < 0
|| off > b.length
|| len < 0
|| off + len > b.length
|| off + len < 0) {
throw new IndexOutOfBoundsException();
}
if (len == 0) {
return;
}
synchronized (this) {
writeImpl(b, off, len);
}
}