我从 Apace Commons APIDOC 找到了这个方法摘要,但我不明白如何使用它。
byte[] decode(String pArray)
Decodes a String containing containing characters in the Base64 alphabet.
你能给出语法示例吗?我在 APIDOC 中找不到语法。
PS:这是来自base64解码部分。我理解这个概念,但想使用这种方法。我正在寻找示例代码。
最佳答案
请求的代码示例:
import org.apache.commons.codec.binary.Base64;
void example() {
String srr = FileUtils.readFileToString(new File("c:\\test.txt"));
byte b[];
Base64 base64 = new Base64();
b=base64.decode(srr);
}
关于java - 无法理解 Apache commons API 文档中的此方法摘要,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1802782/