Search code examples
javaandroidusbserialhexdump

Where is HexDump in the Android API?


I'm using this library to read from and write to USB devices. I'm trying to figure out the event driven reader scheme where on received data, the original source example is using a HexDump method on the byte array.

 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());
    }

Where is this class in the Android API? I can't figure it out. In the meantime I've copied the HexDump source from here and pasted it into my project as one of my classes. But, if this is already part of the Android API, then I shouldn't have to. I can't figure out what import its under.


Solution

  • I believe that class comes from Apache Commons, which is included in the project you reference here.