Examples of PduGenerator


Examples of org.ajwcc.pduUtils.gsm3040.PduGenerator

    return str;
  }

  public List<String> getPdus(String smscNumber, int mpRefNo)
  {
    PduGenerator pduGenerator = new PduGenerator();
    SmsSubmitPdu pdu = createPduObject();
    initPduObject(pdu, smscNumber);
    return pduGenerator.generatePduList(pdu, mpRefNo);
  }
View Full Code Here

Examples of org.ajwcc.pduUtils.gsm3040.PduGenerator

  @Override
  public String getPduUserData()
  {
    // generate
    PduGenerator pduGenerator = new PduGenerator();
    SmsSubmitPdu pdu = createPduObject();
    initPduObject(pdu, "");
    // NOTE: - the mpRefNo is arbitrarily set to 1
    // - this won't matter since we aren't looking at the UDH in this method
    // - this method is not allowed for 7-bit messages with UDH
    // since it is probable that the returned value will not be
    // correct due to the encoding's dependence on the UDH
    // - if the user wishes to extract the UD per part, he would need to get all pduStrings
    // using getPdus(String smscNumber, int mpRefNo), use a
    // PduParser on each pduString in the returned list, then access the UD via the Pdu object
    List<String> pdus = pduGenerator.generatePduList(pdu, 1);
    // my this point, pdu will be updated with concat info (in udhi), if present
    if ((pdu.hasTpUdhi()) && (getEncoding() == MessageEncodings.ENC7BIT)) { throw new RuntimeException("getPduUserData() not supported for 7-bit messages with UDH"); }
    // sum up the ud parts
    StringBuffer ud = new StringBuffer();
    for (String pduString : pdus)
View Full Code Here

Examples of org.ajwcc.pduUtils.gsm3040.PduGenerator

  @Override
  public String getPduUserDataHeader()
  {
    // generate
    PduGenerator pduGenerator = new PduGenerator();
    SmsSubmitPdu pdu = createPduObject();
    initPduObject(pdu, "");
    // NOTE: - the mpRefNo is arbitrarily set to 1
    // - if the user wishes to extract the UDH per part, he would need to get all pduStrings
    // using getPdus(String smscNumber, int mpRefNo), use a
    // PduParser on each pduString in the returned list, then access the UDH via the Pdu object
    List<String> pdus = pduGenerator.generatePduList(pdu, 1);
    Pdu newPdu = new PduParser().parsePdu(pdus.get(0));
    byte[] udh = newPdu.getUDHData();
    if (udh != null) return PduUtils.bytesToPdu(udh);
    return null;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.