org.apache.hadoop.hbase.util.Base64.encodeFileToFile()方法的使用及代码示例

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

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

Base64.encodeFileToFile介绍

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

代码示例

代码示例来源:origin: com.aliyun.hbase/alihbase-common

/**
 * Main program. Used for testing.
 *
 * Encodes or decodes two files from the command line
 *
 * @param args command arguments
 */
public static void main(String[] args) {
 if (args.length < 3) {
  usage("Not enough arguments.");
 } else {
  String flag = args[0];
  String infile = args[1];
  String outfile = args[2];
  if (flag.equals("-e")) {                          // encode
   encodeFileToFile(infile, outfile);
  } else if (flag.equals("-d")) {                   // decode
   decodeFileToFile(infile, outfile);
  } else {
   usage("Unknown flag: " + flag);
  }
 }
} // end main

代码示例来源:origin: co.cask.hbase/hbase

/**
 * Main program. Used for testing.
 *
 * Encodes or decodes two files from the command line
 *
 * @param args command arguments
 */
public static void main(String[] args) {
 if (args.length < 3) {
  usage("Not enough arguments.");
 } else {
  String flag = args[0];
  String infile = args[1];
  String outfile = args[2];
  if (flag.equals("-e")) {                          // encode
   encodeFileToFile(infile, outfile);
  } else if (flag.equals("-d")) {                   // decode
   decodeFileToFile(infile, outfile);
  } else {
   usage("Unknown flag: " + flag);
  }
 }
} // end main

代码示例来源:origin: harbby/presto-connectors

/**
 * Main program. Used for testing.
 *
 * Encodes or decodes two files from the command line
 *
 * @param args command arguments
 */
public static void main(String[] args) {
 if (args.length < 3) {
  usage("Not enough arguments.");
 } else {
  String flag = args[0];
  String infile = args[1];
  String outfile = args[2];
  if (flag.equals("-e")) {                          // encode
   encodeFileToFile(infile, outfile);
  } else if (flag.equals("-d")) {                   // decode
   decodeFileToFile(infile, outfile);
  } else {
   usage("Unknown flag: " + flag);
  }
 }
} // end main

相关文章