【发布时间】:2014-02-24 23:21:18
【问题描述】:
我正在尝试从 Dropbox 解码我的一个文件。使用此论坛中的帖子之一
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.codec.binary.StringUtils;
String base64String = getFileResults.get_Response();//returns a file content in base64
String result = StringUtils.newStringUtf8(Base64.decodeBase64(base64String));
但 Netbeans 一直告诉我 decodeBase64() 不接受字符串,但 API 说它接受 base 64 中的字符串。
我错过了什么?
【问题讨论】:
-
您缺少
)。 -
我很抱歉发布这个......我不敢相信我错过了那个。谢谢。
-
没关系,它仍然给出同样的错误
-
您使用的是什么版本的 apache commons?请发布完整的错误消息。
-
编译错误:Base64 中的 decode64 不能应用于给定类型。必需:找到字节[]:字符串
标签: java base64 apache-commons