|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sim.toolkit.ViewHandler | +--sim.toolkit.EnvelopeHandler
The EnvelopeHandler class contains basic methods to handle the Envelope
data field. This class will be used by the Toolkit applet in order to
have access to the current Envelope information. No constructor is available
for the Toolkit applet. The EnvelopeHandler class is a Temporary JCRE
Entry Point Object. The only way to get a EnvelopeHandler reference is
through the getTheHandler()
static method.
Toolkit Applet Example:
private static final byte MY_TAG = (byte)0x54;
private byte[] data;
data = new byte[32];
void processToolkit(byte event) throws ToolkitException {
// get the EnvelopeHandler system instance
EnvelopeHandler theEnv = EnvelopeHandler.getTheHandler();
// look for MY_TAG TLV
if (theEnv.findTLV(MY_TAG, (byte)1) != TLV_NOT_FOUND) {
// check first element byte
if (theEnv.getValueByte((short)0) == (byte)1) {
// copy element part into data buffer
theEnv.copyValue((short)1,
data,
(short)0,
(short)(theEnv.getValueLength() - 1));
}
}
}
ViewHandler
,
EnvelopeResponseHandler
,
ProactiveHandler
,
ToolkitException
Method Summary | |
byte |
getEnvelopeTag()
Returns the Envelope BER-TLV tag. |
byte |
getItemIdentifier()
Returns the item identifier byte value from the first Item Identifier TLV element in the current Envelope data field. |
short |
getSecuredDataLength()
Looks for the length of the Secured Data from the Command Packet in the first SMS TPDU or Cell Broadcast Page Simple TLV contained in the Envelope handler. |
short |
getSecuredDataOffset()
Looks for the Secured Data from the Command Packet in the first SMS TPDU or Cell Broadcast Page Simple TLV contained in the Envelope handler. |
static EnvelopeHandler |
getTheHandler()
Returns the single system instance of the EnvelopeHandler class. |
short |
getTPUDLOffset()
Looks for the TP-UDL field in the first TPDU TLV element in the Envelope data field. |
Methods inherited from class sim.toolkit.ViewHandler |
compareValue,
copy,
copyValue,
findAndCompareValue,
findAndCompareValue,
findAndCopyValue,
findAndCopyValue,
findTLV,
getLength,
getValueByte,
getValueLength |
Methods inherited from class java.lang.Object |
equals |
Method Detail |
public static EnvelopeHandler getTheHandler() throws ToolkitException
HANDLER_NOT_AVAILABLE
if the handler is busy.public byte getEnvelopeTag()
public short getTPUDLOffset() throws ToolkitException
UNAVAILABLE_ELEMENT
in case of unavailable TPDU TLV element or if the TPUDL field does not existpublic short getSecuredDataOffset() throws ToolkitException
UNAVAILABLE_ELEMENT
in case of unavailable SMS TPDU or Cell Broadcast Page TLV element or wrong data format public short getSecuredDataLength() throws ToolkitException
UNAVAILABLE_ELEMENT
in case of unavailable SMS TPDU or Cell Broadcast Page TLV element or wrong data format public byte getItemIdentifier() throws ToolkitException
UNAVAILABLE_ELEMENT
in case of unavailable TLV element
OUT_OF_TLV_BOUNDARIES
if the item identifier byte is missing in the Item Identifier Simple TLV
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |