Back to project page USBIPServerForAndroid.
The source code is released under:
GNU General Public License
If you think the Android project USBIPServerForAndroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.cgutman.usbip.server.protocol; /* w w w . ja v a 2 s .c om*/ import java.nio.ByteBuffer; import java.nio.ByteOrder; public class UsbIpInterface { public byte bInterfaceClass; public byte bInterfaceSubClass; public byte bInterfaceProtocol; public static final int WIRE_SIZE = 4; public byte[] serialize() { ByteBuffer bb = ByteBuffer.allocate(WIRE_SIZE).order(ByteOrder.BIG_ENDIAN); bb.put(bInterfaceClass); bb.put(bInterfaceSubClass); bb.put(bInterfaceProtocol); // Extra alignment padding of 1 byte return bb.array(); } }