code: public static void readFully(InputStream input, byte[] buffer) throws IOException {
          readFully(input, buffer, 0, buffer.length);
      }
docs: Read the requested number of bytes or fail if there are not enough left.
  <p/>
  This allows for the possibility that {@link InputStream#read(byte[], int, int)} may
  not read as many bytes as requested (most likely because of reaching EOF).
  
  @param input  where to read input from
  @param buffer destination
  @throws IOException              if there is a problem reading the file
  @throws IllegalArgumentException if length is negative
  @throws EOFException             if the number of bytes read was incorrect
  @since 2.2