response.setSequenceNumber(deliverSM.getSequenceNumber());
return response;
}
public static Request getPDUFromHexDump(String hexDump) {
Request request = null;
try {
ByteBuffer bb = new ByteBuffer();
int count = hexDump.length() / 2;
boolean isSubmit = false;
for (int i = 0; i < count; i++) {
String digit = hexDump.substring(i*2, (i*2)+2).trim();
byte b = Utilities.strToHex(digit);
if(i == 7) {
if(b == 0x5) {
isSubmit = false;
} else {
isSubmit = true;
}
}
bb.appendByte(b);
}
if(isSubmit == true) {
request = new SubmitSM();
request.setData(bb);
} else {
request = new DeliverSM();
request.setData(bb);
}
} catch (Exception e) {
logger.error("getPDUFromHexDump unexpected exception " +
e.getMessage());
request = null;