0

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.

GhostRavenstorm
  • 634
  • 3
  • 9
  • 29

2 Answers2

2

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

It's not in the Android SDK. It is a class in the example project. As in your case, it is a clone of the one from the AOSP.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
1

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

stkent
  • 19,772
  • 14
  • 85
  • 111