code: public final void readFully(byte pBytes[], int pOffset, int pLength) throws IOException {
          if (pLength < 0) {
              throw new IndexOutOfBoundsException();
          }
  
          int count = 0;
  
          while (count < pLength) {
              int read = in.read(pBytes, pOffset + count, pLength - count);
  
              if (read < 0) {
                  throw new EOFException();
              }
  
              count += read;
          }
      }
docs: See the general contract of the {@code readFully}
  method of {@code DataInput}.
  <p/>
  Bytes
  for this operation are read from the contained
  input stream.
  
  @param pBytes   the buffer into which the data is read.
  @param pOffset the start offset of the data.
  @param pLength the number of bytes to read.
  @throws EOFException if this input stream reaches the end before
  reading all the bytes.
  @throws IOException  if an I/O error occurs.
  @see java.io.FilterInputStream#in