/** * Encodes or decodes two files from the command line; * <strong>feel free to delete this method (in fact you probably should) * if you're embedding this code into a larger program.</strong> * * @param args Input args */ public static final void main(final String[] args) { if (args.length < 3) { Base64.usage("Not enough arguments."); } else { // end if: args.length < 3 String flag = args[0]; String infile = args[1]; String outfile = args[2]; if (flag.equals("-e")) { Base64.encodeFileToFile(infile, outfile); } else if (flag.equals("-d")) { // end if: encode Base64.decodeFileToFile(infile, outfile); } else { // end else if: decode Base64.usage("Unknown flag: " + flag); } // end else } // end else } // end main
/** * Encodes or decodes two files from the command line; * <strong>feel free to delete this method (in fact you probably should) * if you're embedding this code into a larger program.</strong> * * @param args Input args */ public static final void main(final String[] args) { if (args.length < 3) { Base64.usage("Not enough arguments."); } else { // end if: args.length < 3 String flag = args[0]; String infile = args[1]; String outfile = args[2]; if (flag.equals("-e")) { Base64.encodeFileToFile(infile, outfile); } else if (flag.equals("-d")) { // end if: encode Base64.decodeFileToFile(infile, outfile); } else { // end else if: decode Base64.usage("Unknown flag: " + flag); } // end else } // end else } // end main
/** * Encodes or decodes two files from the command line; * <strong>feel free to delete this method (in fact you probably should) * if you're embedding this code into a larger program.</strong> * * @param args Input args */ public static final void main(final String[] args) { if (args.length < 3) { Base64.usage("Not enough arguments."); } else { // end if: args.length < 3 String flag = args[0]; String infile = args[1]; String outfile = args[2]; if (flag.equals("-e")) { Base64.encodeFileToFile(infile, outfile); } else if (flag.equals("-d")) { // end if: encode Base64.decodeFileToFile(infile, outfile); } else { // end else if: decode Base64.usage("Unknown flag: " + flag); } // end else } // end else } // end main
/** * Encodes or decodes two files from the command line; * <strong>feel free to delete this method (in fact you probably should) * if you're embedding this code into a larger program.</strong> * * @param args Input args */ public static final void main(final String[] args) { if (args.length < 3) { Base64.usage("Not enough arguments."); } else { // end if: args.length < 3 String flag = args[0]; String infile = args[1]; String outfile = args[2]; if (flag.equals("-e")) { Base64.encodeFileToFile(infile, outfile); } else if (flag.equals("-d")) { // end if: encode Base64.decodeFileToFile(infile, outfile); } else { // end else if: decode Base64.usage("Unknown flag: " + flag); } // end else } // end else } // end main
/** * Encodes or decodes two files from the command line; * <strong>feel free to delete this method (in fact you probably should) * if you're embedding this code into a larger program.</strong> * * @param args Input args */ public static final void main(final String[] args) { if (args.length < 3) { Base64.usage("Not enough arguments."); } else { // end if: args.length < 3 String flag = args[0]; String infile = args[1]; String outfile = args[2]; if (flag.equals("-e")) { Base64.encodeFileToFile(infile, outfile); } else if (flag.equals("-d")) { // end if: encode Base64.decodeFileToFile(infile, outfile); } else { // end else if: decode Base64.usage("Unknown flag: " + flag); } // end else } // end else } // end main
/** * Encodes or decodes two files from the command line; * <strong>feel free to delete this method (in fact you probably should) * if you're embedding this code into a larger program.</strong> * * @param args Input args */ public static final void main(final String[] args) { if (args.length < 3) { Base64.usage("Not enough arguments."); } else { // end if: args.length < 3 String flag = args[0]; String infile = args[1]; String outfile = args[2]; if (flag.equals("-e")) { Base64.encodeFileToFile(infile, outfile); } else if (flag.equals("-d")) { // end if: encode Base64.decodeFileToFile(infile, outfile); } else { // end else if: decode Base64.usage("Unknown flag: " + flag); } // end else } // end else } // end main
/** * Encodes or decodes two files from the command line; * <strong>feel free to delete this method (in fact you probably should) * if you're embedding this code into a larger program.</strong> * * @param args Input args */ public static final void main(final String[] args) { if (args.length < 3) { Base64.usage("Not enough arguments."); } else { // end if: args.length < 3 String flag = args[0]; String infile = args[1]; String outfile = args[2]; if (flag.equals("-e")) { Base64.encodeFileToFile(infile, outfile); } else if (flag.equals("-d")) { // end if: encode Base64.decodeFileToFile(infile, outfile); } else { // end else if: decode Base64.usage("Unknown flag: " + flag); } // end else } // end else } // end main