public static boolean validate(String file) throws IOException { String[] files = new String[1]; files[0] = file; return validate(files)[0]; }
@Deprecated public static void process(String label, BufferedReader in) throws IOException { validate(in, label); }
public static void main(String[] args) throws Exception { CommandLineTools.runUpgradeCheck(args); boolean result = true; if (args.length == 0) { // read from stdin result = validate(new BufferedReader( new InputStreamReader(System.in, Constants.ENCODING)), "<stdin>"); } else { // read from file(s) boolean[] results = validate(args); int count = 0; for (int i = 0; i < results.length; i++) { if (results[i]) { count++; } } //Check if all files are valid result = (count == results.length); } if (result) { System.exit(0); } else { System.exit(1); } }