code: public synchronized static void close() throws IOException {
          if (initialized) {
              initialized = false;
              reader = null;
              if (terminal != null) {
                  try {
                      terminal.close();
                  } finally {
                      terminal = null;
                  }
              }
          }
      }
docs: Closes the JLine {@link Terminal} (if available) and restores the original
  terminal settings.
  
  @throws IOException If an I/O error occurs