public static String dump(final ConfigDescriptor descriptor){
  return String.format("Configuration Descriptor:%n" + "  bLength %18d%n" + "  bDescriptorType %10d%n"+ "  wTotalLength %13d%n"+ "  bNumInterfaces %11d%n"+ "  bConfigurationValue %6d%n"+ "  iConfiguration %11d%n"+ "  bmAttributes %13s%n"+ "    %s%n"+ "%s"+ "  bMaxPower %16smA%n",descriptor.bLength(),descriptor.bDescriptorType(),descriptor.wTotalLength() & 0xffff,descriptor.bNumInterfaces() & 0xff,descriptor.bConfigurationValue() & 0xff,descriptor.iConfiguration() & 0xff,String.format("0x%02x",descriptor.bmAttributes() & 0xff),((descriptor.bmAttributes() & 64) == 0) ? "(Bus Powered)" : "Self Powered",((descriptor.bmAttributes() & 32) == 0) ? "" : String.format("    Remote Wakeup%n"),(descriptor.bMaxPower() & 0xff) * 2);
}

public static String dump ( final ConfigDescriptor descriptor ) { return String . format ( "Configuration Descriptor:%n" + "  bLength %18d%n" + "  bDescriptorType %10d%n" + "  wTotalLength %13d%n" + "  bNumInterfaces %11d%n" + "  bConfigurationValue %6d%n" + "  iConfiguration %11d%n" + "  bmAttributes %13s%n" + "    %s%n" + "%s" + "  bMaxPower %16smA%n" , descriptor . bLength ( ) , descriptor . bDescriptorType ( ) , descriptor . wTotalLength ( ) & 0xffff , descriptor . bNumInterfaces ( ) & 0xff , descriptor . bConfigurationValue ( ) & 0xff , descriptor . iConfiguration ( ) & 0xff , String . format ( "0x%02x" , descriptor . bmAttributes ( ) & 0xff ) , ( ( descriptor . bmAttributes ( ) & 64 ) == 0 ) ? "(Bus Powered)" : "Self Powered" , ( ( descriptor . bmAttributes ( ) & 32 ) == 0 ) ? "" : String . format ( "    Remote Wakeup%n" ) , ( descriptor . bMaxPower ( ) & 0xff ) * 2 ) ; }
dumps the specified usb configuration descriptor into a string and returns it .
