Phi*_*hil 3 java string api android
我必须将字节数组转换为字符串.因此我使用这个功能:
public static String byteToString(byte[] bytes) {
String str = new String(bytes, Charset.forName("UTF8"));
return str;
}
Run Code Online (Sandbox Code Playgroud)
问题是,它需要API 9:
Call requires API level 9 (current min is 8): new java.lang.String
但我也想向API 8用户提供我的应用程序.有没有可能或替代方案?
| 归档时间: |
|
| 查看次数: |
611 次 |
| 最近记录: |