use of org.mobicents.protocols.ss7.map.smstpdu.SmsDeliverTpduImpl in project smscgateway by RestComm.
the class MtTest2 method Ucs2Test.
@Test(groups = { "Mt" })
public void Ucs2Test() throws Exception {
// Long msgId = 15L;
// String s1 = msgId.toString(10);
// String sss2 = String.format("%010d", 15L);
String s11 = "زمانیکه بررسی";
Charset ucs2Charset = Charset.forName("UTF-16BE");
Charset utf8 = Charset.forName("UTF-8");
// ByteBuffer bb = ByteBuffer.wrap(textPart);
// CharBuffer bf = ucs2Charset.decode(bb);
// msg = bf.toString();
ByteBuffer bb = utf8.encode(s11);
byte[] buf = new byte[bb.limit()];
bb.get(buf, 0, bb.limit());
String s2 = new String(buf);
UserDataImpl ud = new UserDataImpl(s2, new DataCodingSchemeImpl(8), null, null);
AddressField originatingAddress = new AddressFieldImpl(TypeOfNumber.InternationalNumber, NumberingPlanIdentification.ISDNTelephoneNumberingPlan, "123456");
ProtocolIdentifier pi = new ProtocolIdentifierImpl(0);
AbsoluteTimeStamp serviceCentreTimeStamp = new AbsoluteTimeStampImpl(05, 3, 4, 5, 6, 7, 0);
SmsDeliverTpduImpl smsDeliverTpduImpl = new SmsDeliverTpduImpl(false, false, false, true, originatingAddress, pi, serviceCentreTimeStamp, ud);
SmsSignalInfoImpl SmsSignalInfoImpl = new SmsSignalInfoImpl(smsDeliverTpduImpl, null);
int gg = 0;
gg++;
}
use of org.mobicents.protocols.ss7.map.smstpdu.SmsDeliverTpduImpl in project smscgateway by RestComm.
the class MtTest2 method Ucs2Test3.
@Test(groups = { "Mt" })
public void Ucs2Test3() throws Exception {
String s11 = "ura nus";
byte[] buf = s11.getBytes();
UserDataImpl ud = new UserDataImpl(s11, new DataCodingSchemeImpl(16), null, null);
AddressField originatingAddress = new AddressFieldImpl(TypeOfNumber.InternationalNumber, NumberingPlanIdentification.ISDNTelephoneNumberingPlan, "123456");
ProtocolIdentifier pi = new ProtocolIdentifierImpl(0);
AbsoluteTimeStamp serviceCentreTimeStamp = new AbsoluteTimeStampImpl(05, 3, 4, 5, 6, 7, 0);
SmsDeliverTpduImpl smsDeliverTpduImpl = new SmsDeliverTpduImpl(false, false, false, true, originatingAddress, pi, serviceCentreTimeStamp, ud);
SmsSignalInfoImpl SmsSignalInfoImpl = new SmsSignalInfoImpl(smsDeliverTpduImpl, null);
int gg = 0;
gg++;
}
Aggregations