src/it/unimi/dsi/fastutil/io/FastByteArrayInputStream.java
@Override
	public int read(final byte b[], final int offset, final int length) {
		if (this.length == this.position) return length == 0 ? 0 : -1;
		final int n = Math.min(length, this.length - this.position);
		System.arraycopy(array, this.offset + this.position, b, offset, n);
		this.position += n;
		return n;
	}
@Override
	public int read(final byte b[], final int offset, final int length) {
		if (this.length == this.position) return length == 0 ? 0 : -1;
		final int n = Math.min(length, this.length - this.position);
		System.arraycopy(array, this.offset + this.position, b, offset, n);
		this.position += n;
		return n;
	}
Reads bytes from this byte-array input stream as
specified in {@link java.io.InputStream#read(byte[], int, int)}.
Note that the implementation given in {@link java.io.ByteArrayInputStream#read(byte[], int, int)}
will return -1 on a zero-length read at EOF, contrarily to the specification. We won't.