Class MessageUtil
- java.lang.Object
-
- com.github.mikesafonov.smpp.core.utils.MessageUtil
-
public class MessageUtil extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static intGSM_7_MULTIPART_MESSAGE_LENGTHstatic intGSM_7_REGULAR_MESSAGE_LENGTHstatic intUCS_2_MULTIPART_MESSAGE_LENGTHstatic intUCS_2_REGULAR_MESSAGE_LENGTH
-
Constructor Summary
Constructors Constructor Description MessageUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CountWithEncodingcalculateCountSMS(java.lang.String message)Calculate count of sms message parts need to delivery with message textmessage.static CountWithEncodingcalculateCountSMS(java.lang.String message, boolean ucs2Only)Calculate count of sms message parts need to delivery with message textmessage.
-
-
-
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
-
-
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 textmessage. Ifucs2Only = truethen message calculated in UCS2 encoding, otherwise encoding detecting according to message text- Parameters:
message- message textucs2Only- 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 textmessage. Encoding of sms detecting according to message text- Parameters:
message- message text- Returns:
- count sms parts
-
-