code: public static IOSafeTerminal createRuntimeExceptionConvertingAdapter(Terminal terminal) {
          if (terminal instanceof ExtendedTerminal) { // also handle Runtime-type:
              return createRuntimeExceptionConvertingAdapter((ExtendedTerminal)terminal);
          } else {
              return new IOSafeTerminalAdapter(terminal, new ConvertToRuntimeException());
          }
      }
docs: Creates a wrapper around a Terminal that exposes it as a IOSafeTerminal. If any IOExceptions occur, they will be
  wrapped by a RuntimeException and re-thrown.
  @param terminal Terminal to wrap
  @return IOSafeTerminal wrapping the supplied terminal