Package org.jsmpp.bean

Examples of org.jsmpp.bean.MessageRequest


    }

    @Override
    protected Object createBody() {
        if (command instanceof MessageRequest) {
            MessageRequest msgRequest = (MessageRequest)command;
            byte[] shortMessage = msgRequest.getShortMessage();
            if (shortMessage == null || shortMessage.length == 0) {
                return null;
            }
            if (SmppUtils.parseAlphabetFromDataCoding(msgRequest.getDataCoding()) == Alphabet.ALPHA_8_BIT) {
                return shortMessage;
            } else if (Charset.isSupported(configuration.getEncoding())) {
                try {
                    return new String(shortMessage, configuration.getEncoding());
                } catch (UnsupportedEncodingException e) {
View Full Code Here


    }

    @Override
    protected Object createBody() {
        if (command instanceof MessageRequest) {
            MessageRequest msgRequest = (MessageRequest)command;
            byte[] shortMessage = msgRequest.getShortMessage();
            if (shortMessage == null || shortMessage.length == 0) {
                return null;
            }
            if (SmppUtils.parseAlphabetFromDataCoding(msgRequest.getDataCoding()) == Alphabet.ALPHA_8_BIT) {
                return shortMessage;
            } else if (Charset.isSupported(configuration.getEncoding())) {
                try {
                    return new String(shortMessage, configuration.getEncoding());
                } catch (UnsupportedEncodingException e) {
View Full Code Here

    }

    @Override
    protected Object createBody() {
        if (command instanceof MessageRequest) {
            MessageRequest msgRequest = (MessageRequest)command;
            byte[] shortMessage = msgRequest.getShortMessage();
            if (shortMessage == null || shortMessage.length == 0) {
                return null;
            }
            if (SmppUtils.parseAlphabetFromDataCoding(msgRequest.getDataCoding()) == Alphabet.ALPHA_8_BIT) {
                return shortMessage;
            }
           
            String encoding = IOHelper.getCharsetName(getExchange(), false);
            if (ObjectHelper.isEmpty(encoding) || !Charset.isSupported(encoding)) {
View Full Code Here

TOP

Related Classes of org.jsmpp.bean.MessageRequest

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.