code: protected IOException newTimeoutException(IOException cause) {
      InterruptedIOException e = new InterruptedIOException("timeout");
      if (cause != null) {
        e.initCause(cause);
      }
      return e;
    }
docs: Returns an {@link IOException} to represent a timeout. By default this method returns
  {@link java.io.InterruptedIOException}. If {@code cause} is non-null it is set as the cause of
  the returned exception.