public static String dump(final EndpointDescriptor descriptor){
  return String.format("Endpoint Descriptor:%n" + "  bLength %18d%n" + "  bDescriptorType %10d%n"+ "  bEndpointAddress %9s  EP %d %s%n"+ "  bmAttributes %13d%n"+ "    Transfer Type             %s%n"+ "    Synch Type                %s%n"+ "    Usage Type                %s%n"+ "  wMaxPacketSize %11d%n"+ "  bInterval %16d%n",descriptor.bLength(),descriptor.bDescriptorType(),String.format("0x%02x",descriptor.bEndpointAddress() & 0xff),descriptor.bEndpointAddress() & 0x0f,getDirectionName(descriptor.bEndpointAddress()),descriptor.bmAttributes() & 0xff,getTransferTypeName(descriptor.bmAttributes()),getSynchTypeName(descriptor.bmAttributes()),getUsageTypeName(descriptor.bmAttributes()),descriptor.wMaxPacketSize() & 0xffff,descriptor.bInterval() & 0xff);
}

public static String dump ( final EndpointDescriptor descriptor ) { return String . format ( "Endpoint Descriptor:%n" + "  bLength %18d%n" + "  bDescriptorType %10d%n" + "  bEndpointAddress %9s  EP %d %s%n" + "  bmAttributes %13d%n" + "    Transfer Type             %s%n" + "    Synch Type                %s%n" + "    Usage Type                %s%n" + "  wMaxPacketSize %11d%n" + "  bInterval %16d%n" , descriptor . bLength ( ) , descriptor . bDescriptorType ( ) , String . format ( "0x%02x" , descriptor . bEndpointAddress ( ) & 0xff ) , descriptor . bEndpointAddress ( ) & 0x0f , getDirectionName ( descriptor . bEndpointAddress ( ) ) , descriptor . bmAttributes ( ) & 0xff , getTransferTypeName ( descriptor . bmAttributes ( ) ) , getSynchTypeName ( descriptor . bmAttributes ( ) ) , getUsageTypeName ( descriptor . bmAttributes ( ) ) , descriptor . wMaxPacketSize ( ) & 0xffff , descriptor . bInterval ( ) & 0xff ) ; }
dumps the specified usb endpoint descriptor into a string and returns it .
