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.
Java Source Code
package org.cgutman.usbip.server.protocol.dev;
/*fromwww.java2s.com*/import java.nio.ByteBuffer;
import java.nio.ByteOrder;
publicclass UsbIpUnlinkUrbReply extends UsbIpDevicePacket {
publicint status;
public UsbIpUnlinkUrbReply(int seqNum, int devId, int dir, int ep) {
super(UsbIpDevicePacket.USBIP_RET_UNLINK, seqNum, devId, dir, ep);
}
protectedbyte[] serializeInternal() {
ByteBuffer bb = ByteBuffer.allocate(UsbIpDevicePacket.USBIP_HEADER_SIZE - 20).order(ByteOrder.BIG_ENDIAN);
bb.putInt(status);
return bb.array();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(super.toString());
sb.append(String.format("Status: 0x%x\n", status));
return sb.toString();
}
}