code: protected final int read(byte[] buffer, int offset, int length) throws IOException {
          ensureOpen();
          return readFully(buffer, offset, length);
      }
docs: Reads up to <code>length</code> bytes into the specified buffer, starting at the specified offset. The actual
  number of bytes read will be less than <code>length</code> if there are not enough available bytes to read, or if
  the buffer is not large enough.
  
  @return the number of bytes read into the buffer