Constructs a Data instance.
An object containing optional parameters for the Data instance
Gets the raw data of the SMS message.
This property holds the actual content of the message, which could be text or binary data, depending on how the message was encoded.
The raw data as a string
Indicates whether the message data is encoded using Unicode.
This property is true if the message content includes characters that require Unicode encoding (e.g., non-Latin characters). Otherwise, it's false.
A boolean indicating if the message data is Unicode.
Provides access to the individual parts of the message.
For longer messages that are split into multiple parts (segments), this getter allows access to each part. Each part contains a portion of the message data along with metadata.
An array of Part instances, each representing a segment of the message
Retrieves the size of the message data.
The size is determined based on the encoding and content of the message. It reflects the number of characters or bytes.
The size of the data
Appends the parts from another PDU to this data instance.
This method is used to combine the parts of another message (Deliver or Submit) into this one, effectively concatenating the messages. It ensures parts are added only once and sorts them.
Retrieves the textual content of the SMS message.
This method decodes the raw data into a readable text format, considering the encoding scheme (e.g., GSM 7-bit, UCS-2) used for the message.
The decoded text of the message
Sets the data for the SMS message.
This method encodes the provided data string according to the specified PDU type (Deliver or Submit) and updates the message parts accordingly. It handles encoding, part splitting, and header preparation.
The instance of this Data, allowing for method chaining
Represents the data content of an SMS message.
Holds the actual message content, whether text or binary data. It is central to the purpose of SMS, conveying the intended information from sender to recipient.