/** * Checks with the user whether the specified operation may proceed. * * @param format String format with a question describing the operation about to be executed. * @param arguments String format arguments. * @return whether the operation may proceed, or not. * @throws IOException on I/O error. */ protected boolean mayProceed(String format, Object...arguments) throws IOException { if (!isInteractive()) { return true; } if (yesNoPrompt(String.format(format, arguments))) { return true; } getPrintStream().println("Aborted."); return false; }