org.apache.activemq.artemis.utils.Base64.encodeFileToFile()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(213)

本文整理了Java中org.apache.activemq.artemis.utils.Base64.encodeFileToFile()方法的一些代码示例,展示了Base64.encodeFileToFile()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Base64.encodeFileToFile()方法的具体详情如下:
包路径:org.apache.activemq.artemis.utils.Base64
类名称:Base64
方法名:encodeFileToFile

Base64.encodeFileToFile介绍

[英]Reads infile and encodes it to outfile.
[中]读取infile并将其编码为outfile。

代码示例

代码示例来源:origin: wildfly/wildfly

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

代码示例来源:origin: apache/activemq-artemis

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

代码示例来源:origin: org.apache.activemq/artemis-commons

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

代码示例来源:origin: apache/activemq-artemis

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

代码示例来源:origin: apache/activemq-artemis

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

代码示例来源:origin: org.apache.activemq/artemis-jms-client-all

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

代码示例来源:origin: org.jboss.eap/wildfly-client-all

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

相关文章