Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
通过使用 SAP JCO,我能够将 SAP 表 DBTABLOG 数据读入 Java 应用程序。
该表在其中一列中有原始数据(数据类型:LRAW),无法理解内容。
我们如何将这些 RAW 数据转换为 Java 中的可读格式?欢迎任何想法。
javax.xml.bind.DatatypeConverter.printHexBinary在类似的情况下使用对我有用。
javax.xml.bind.DatatypeConverter.printHexBinary
此外,我们也可以使用 javaString构造函数将字节转换为可读的字符串。
String
String readableStr = new String(bytes)
或者
与字符编码一起使用
String readableStr = new String(bytes, "UTF-16")