|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sim.toolkit.ViewHandler | +--sim.toolkit.EditHandler
This class is the basic class for the construction of a list of simple TLV elements. This class is able to handle Simple TLV with a value field no longer than 255 bytes.
ViewHandler
,
ProactiveHandler
,
EnvelopeResponseHandler
,
ToolkitException
Method Summary | |
void |
appendArray(byte[] buffer,
short offset,
short length)
Appends a buffer into the EditHandler buffer. |
void |
appendTLV(byte tag,
byte value)
Appends a TLV element to the current TLV list (1-byte element). |
void |
appendTLV(byte tag,
byte[] value,
short valueOffset,
short valueLength)
Appends a TLV element to the current TLV list (byte array format). |
void |
appendTLV(byte tag,
byte value1,
byte value2)
Appends a TLV element to the current TLV list (2-byte element) This method is useful to add double byte elements as Device Identities, Duration or Response Length. |
void |
appendTLV(byte tag,
byte value1,
byte[] value2,
short value2Offset,
short value2Length)
Appends a TLV element to the current TLV list (1 byte and a byte array format). |
void |
clear()
Clears the TLV list of an EditHandler and resets the current TLV selected. |
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 void clear() throws ToolkitException
ToolkitException
- with the following reason codes: HANDLER_NOT_AVAILABLE
if the handler is busypublic void appendArray(byte[] buffer, short offset, short length) throws java.lang.NullPointerException, java.lang.ArrayIndexOutOfBoundsException, ToolkitException
Notes:
offset
or length
parameter is negative an ArrayIndexOutOfBoundsException
exception is thrown and no append is performed.
offset+length
is greater than buffer.length
, the length
of the buffer
array an ArrayIndexOutOfBoundsException
exception is thrown
and no append is performed.
buffer
- the buffer containing data for copyoffset
- the offset in the bufferlength
- the value length of the buffer
java.lang.NullPointerException
- if buffer
is null
java.lang.ArrayIndexOutOfBoundsException
- if append would cause access of data outside array bounds
ToolkitException
- with the following reason codes: HANDLER_OVERFLOW
if the EditHandler buffer is to small to append the requested data
HANDLER_NOT_AVAILABLE
if the handler is busypublic void appendTLV(byte tag, byte[] value, short valueOffset, short valueLength) throws java.lang.NullPointerException, java.lang.ArrayIndexOutOfBoundsException, ToolkitException
Notes:
valueOffset
or valueLength
parameter is negative an ArrayIndexOutOfBoundsException
exception is thrown and no append is performed.
valueOffset+valueLength
is greater than value.length
, the length
of the value
array an ArrayIndexOutOfBoundsException
exception is thrown
and no append is performed.
tag
- the tag of the TLV to append, including the Comprehension Required flagvalue
- the buffer containing the TLV valuevalueOffset
- the offset of the TLV value in the buffervalueLength
- the value length of the TLV to append
java.lang.NullPointerException
- if value
is null
java.lang.ArrayIndexOutOfBoundsException
- if append would cause access of data outside array bounds
ToolkitException
- with the following reason codes: HANDLER_OVERFLOW
if the EditHandler buffer is to small to append the requested data
HANDLER_NOT_AVAILABLE
if the handler is busy
BAD_INPUT_PARAMETER
if valueLength
is greater than 255public void appendTLV(byte tag, byte value) throws ToolkitException
tag
- the tag of the TLV to append, including the Comprehension Required flagvalue
- the TLV value on 1 byte
ToolkitException
- with the following reason codes: HANDLER_OVERFLOW
if the EditHandler buffer is to small to append the requested data
HANDLER_NOT_AVAILABLE
if the handler is busypublic void appendTLV(byte tag, byte value1, byte value2) throws ToolkitException
tag
- the tag of the TLV to append, including the Comprehension Required flagvalue1
- the 1st byte (msb) of the TLV valuevalue2
- the 2nd byte (lsb) of the TLV value
ToolkitException
- with the following reason codes: HANDLER_OVERFLOW
if the EditHandler buffer is to small to append the requested data
HANDLER_NOT_AVAILABLE
if the handler is busypublic void appendTLV(byte tag, byte value1, byte[] value2, short value2Offset, short value2Length) throws java.lang.NullPointerException, java.lang.ArrayIndexOutOfBoundsException, ToolkitException
Notes:
value2Offset
or value2Length
parameter is negative an ArrayIndexOutOfBoundsException
exception is thrown and no append is performed.
value2Offset+value2Length
is greater than value2.length
, the length
of the value2
array an ArrayIndexOutOfBoundsException
exception is thrown
and no append is performed.
tag
- the tag of the TLV to append, including the Comprehension Required flagvalue1
- the first byte in the value fieldvalue2
- the buffer containing the rest of the TLV fieldvalue2Offset
- the offset of the rest of the TLV field in the buffervalue2Length
- the value length of the rest of the TLV field to append
java.lang.NullPointerException
- if value2
is null
java.lang.ArrayIndexOutOfBoundsException
- if append would cause access of data outside array bounds.
ToolkitException
- with the following reason codes: HANDLER_OVERFLOW
if the EditHandler buffer is to small to append the requested data
HANDLER_NOT_AVAILABLE
if the handler is busy
BAD_INPUT_PARAMETER
if value2Length
is greater than 254
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |