Class MessageUtil


  • public class MessageUtil
    extends java.lang.Object
    • Field Detail

      • UCS_2_REGULAR_MESSAGE_LENGTH

        public static final int UCS_2_REGULAR_MESSAGE_LENGTH
        See Also:
        Constant Field Values
      • UCS_2_MULTIPART_MESSAGE_LENGTH

        public static final int UCS_2_MULTIPART_MESSAGE_LENGTH
        See Also:
        Constant Field Values
      • GSM_7_REGULAR_MESSAGE_LENGTH

        public static final int GSM_7_REGULAR_MESSAGE_LENGTH
        See Also:
        Constant Field Values
      • GSM_7_MULTIPART_MESSAGE_LENGTH

        public static final int GSM_7_MULTIPART_MESSAGE_LENGTH
        See Also:
        Constant Field Values
    • Constructor Detail

      • MessageUtil

        public MessageUtil()
    • Method Detail

      • calculateCountSMS

        public static CountWithEncoding calculateCountSMS​(@Nullable
                                                          java.lang.String message,
                                                          boolean ucs2Only)
        Calculate count of sms message parts need to delivery with message text message. If ucs2Only = true then message calculated in UCS2 encoding, otherwise encoding detecting according to message text
        Parameters:
        message - message text
        ucs2Only - using UCS2 encoding only
        Returns:
        count sms parts
      • calculateCountSMS

        public static CountWithEncoding calculateCountSMS​(@Nullable
                                                          java.lang.String message)
        Calculate count of sms message parts need to delivery with message text message. Encoding of sms detecting according to message text
        Parameters:
        message - message text
        Returns:
        count sms parts