Android API 中的 HexDump 在哪里?

Where is HexDump in the Android API?

我正在使用此 library 读取和写入 USB 设备。我正在尝试找出事件驱动的 reader 方案,其中在接收到的数据上,原始源示例在字节数组上使用 HexDump 方法。

 private void updateReceivedData(byte[] data) {
        final String message = "Read " + data.length + " bytes: \n"
                + HexDump.dumpHexString(data) + "\n\n";
        mDumpTextView.append(message);
        mScrollView.smoothScrollTo(0, mDumpTextView.getBottom());
    }

class 在 Android API 中的什么地方?我想不通。与此同时,我从 here 复制了 HexDump 源代码并将其作为我的 classes 之一粘贴到我的项目中。但是,如果这已经是 Android API 的一部分,那么我就不必这样做了。我不知道它在什么下导入。

我相信 class 来自 Apache Commons,它包含在您引用的项目中 here

the original source example is using a HexDump method on the byte array... Where is this class in the Android API?

它不在 Android SDK 中。是a class in the example project。与您的情况一样,它是 AOSP 中的一个克隆。