Package ie.omk.smpp

Examples of ie.omk.smpp.Address


    public synchronized void readFrom(byte[] table, int offset, int count) {
        for (int i = 0; i < count; i++) {
            int type = SMPPIO.bytesToInt(table, offset++, 1);
            if (type == 1) {
                // SME address..
                Address a = new Address();
                a.readFrom(table, offset);
                offset += a.getLength();
                dests.add(a);
            } else if (type == 2) {
                // Distribution list name
                String d = SMPPIO.readCString(table, offset);
                offset += d.length() + 1;
View Full Code Here


        if (source != null) {
            source.writeTo(out);
        } else {
            // Write ton=0(null), npi=0(null), address=\0(nul)
            new Address(GSMConstants.GSM_TON_UNKNOWN,
                    GSMConstants.GSM_NPI_UNKNOWN, "").writeTo(out);
        }

        if (destination != null) {
            destination.writeTo(out);
        } else {
            // Write ton=0(null), npi=0(null), address=\0(nul)
            new Address(GSMConstants.GSM_TON_UNKNOWN,
                    GSMConstants.GSM_NPI_UNKNOWN, "").writeTo(out);
        }

        String dt = (deliveryTime == null) ? "" : deliveryTime.toString();
        String et = (expiryTime == null) ? "" : expiryTime.toString();
View Full Code Here

            // First the service type
            serviceType = SMPPIO.readCString(body, offset);
            offset += serviceType.length() + 1;

            source = new Address();
            source.readFrom(body, offset);
            offset += source.getLength();

            destination = new Address();
            destination.readFrom(body, offset);
            offset += destination.getLength();

            // ESM class, protocol Id, priorityFlag...
            esmClass = SMPPIO.bytesToInt(body, offset++, 1);
View Full Code Here

    protected void encodeBody(OutputStream out) throws java.io.IOException {
        if (source != null) {
            source.writeTo(out);
        } else {
            // Write ton=0(null), npi=0(null), address=\0(nul)
            new Address(GSMConstants.GSM_TON_UNKNOWN,
                    GSMConstants.GSM_NPI_UNKNOWN, "").writeTo(out);
        }
        SMPPIO.writeInt(msgCount, 1, out);
    }
View Full Code Here

        SMPPIO.writeInt(msgCount, 1, out);
    }

    public void readBodyFrom(byte[] body, int offset)
            throws SMPPProtocolException {
        source = new Address();
        source.readFrom(body, offset);
        offset += source.getLength();

        msgCount = SMPPIO.bytesToInt(body, offset++, 1);
    }
View Full Code Here

TOP

Related Classes of ie.omk.smpp.Address

Copyright © 2018 www.massapicom. 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.