Translation Sun Help File - Javax.wireless.Messaging (TextMessage)

zhaozj2021-02-16  60

Javax.wireless.Messaging Interface TextMessage

Public Interface TextMessage Extends Message

On behalf of the interface information, it is a sub-interface of Message, which adds a method that can acquire and set text information. The setPayLoadText () method sets the binary information contained in TextMessage, but does not test whether it is legal. The method of operating addresses is inherited from Message. Implementing this interface is just a container of a data.

Character coding consideration

Text Information is using this interface to handle character encoding problems in Java. The underlying implementation of the protocol will convert a string into a coding method specified in the protocol. Different protocol coding methods are different. If the information is transmitted correctly, the program must use the character set that the protocol can handle. Some characters will be incorrectly transmitted if a program uses a character set that the protocol cannot be identified without a clear agreement.

Method detail

SetPayLoadTextPublic java.lang.string getPayLoadText ()

Returns the included valid information in the form of a string.

Returns: Returns the included valid information in the form of a string. Returns NULL if the information is not set.

_________________________________________________________________________________________________________________________

SetPayLoadTextPublic void setPayloadText (java.lang.string data)

Set the information contained in this instance. Data can be NULL.

Parameters: DATA: Information included in this instance.

转载请注明原文地址:https://www.9cbs.com/read-23707.html

New Post(0)