本文整理了Java中org.apache.hadoop.hbase.util.Base64.decodeFromFile()
方法的一些代码示例,展示了Base64.decodeFromFile()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Base64.decodeFromFile()
方法的具体详情如下:
包路径:org.apache.hadoop.hbase.util.Base64
类名称:Base64
方法名:decodeFromFile
[英]Convenience method for reading a base64-encoded file and decoding it.
[中]读取base64编码文件并对其进行解码的简便方法。
代码示例来源:origin: com.aliyun.hbase/alihbase-common
/**
* Reads <tt>infile</tt> and decodes it to <tt>outfile</tt>.
*
* @param infile Input file
* @param outfile Output file
* @since 2.2
*/
public static void decodeFileToFile(String infile, String outfile) {
byte[] decoded = decodeFromFile(infile);
OutputStream out = null;
try {
out = new BufferedOutputStream(new FileOutputStream(outfile));
out.write(decoded);
} catch (IOException e) {
LOG.error("error decoding from file " + infile + " to " + outfile, e);
} finally {
if (out != null) {
try {
out.close();
} catch (Exception e) {
LOG.error("error closing " + outfile, e);
}
}
} // end finally
} // end decodeFileToFile
代码示例来源:origin: co.cask.hbase/hbase
/**
* Reads <tt>infile</tt> and decodes it to <tt>outfile</tt>.
*
* @param infile Input file
* @param outfile Output file
* @since 2.2
*/
public static void decodeFileToFile(String infile, String outfile) {
byte[] decoded = decodeFromFile(infile);
OutputStream out = null;
try {
out = new BufferedOutputStream(new FileOutputStream(outfile));
out.write(decoded);
} catch (IOException e) {
LOG.error("error decoding from file " + infile + " to " + outfile, e);
} finally {
if (out != null) {
try {
out.close();
} catch (Exception e) {
LOG.error("error closing " + outfile, e);
}
}
} // end finally
} // end decodeFileToFile
代码示例来源:origin: harbby/presto-connectors
/**
* Reads <tt>infile</tt> and decodes it to <tt>outfile</tt>.
*
* @param infile Input file
* @param outfile Output file
* @since 2.2
*/
public static void decodeFileToFile(String infile, String outfile) {
byte[] decoded = decodeFromFile(infile);
OutputStream out = null;
try {
out = new BufferedOutputStream(new FileOutputStream(outfile));
out.write(decoded);
} catch (IOException e) {
LOG.error("error decoding from file " + infile + " to " + outfile, e);
} finally {
if (out != null) {
try {
out.close();
} catch (Exception e) {
LOG.error("error closing " + outfile, e);
}
}
} // end finally
} // end decodeFileToFile
内容来源于网络,如有侵权,请联系作者删除!