code: public static void readFully(InputStream in, byte[] dst, int offset, int byteCount) throws IOException {
          if (byteCount == 0) {
              return;
          }
          if (in == null) {
              throw new NullPointerException("in == null");
          }
          if (dst == null) {
              throw new NullPointerException("dst == null");
          }
          Arrays.checkOffsetAndCount(dst.length, offset, byteCount);
          while (byteCount > 0) {
              int bytesRead = in.read(dst, offset, byteCount);
              if (bytesRead < 0) {
                  throw new EOFException();
              }
              offset += bytesRead;
              byteCount -= bytesRead;
          }
      }
docs: Reads exactly 'byteCount' bytes from 'in' (into 'dst' at offset 'offset'), and throws
  EOFException if insufficient bytes are available.
  
  Used to implement {@link java.io.DataInputStream#readFully(byte[], int, int)}.