public final class HandlerBuilder
extends java.lang.Object
HandlerBuilder class is a class to create objects that are implementing TLV handler interfaces.| Modifier and Type | Field and Description |
|---|---|
static byte |
BER_EDIT_HANDLER |
static byte |
EDIT_HANDLER |
| Modifier and Type | Method and Description |
|---|---|
static ViewHandler |
buildTLVHandler(byte type,
short capacity)
Allocates a TLVHandler with an internal buffer of length capacity
|
static ViewHandler |
buildTLVHandler(byte type,
short capacity,
byte[] buffer,
short offset,
short length)
Allocates a TLVHandler with an internal buffer of length capacity.
|
public static final byte EDIT_HANDLER
public static final byte BER_EDIT_HANDLER
public static ViewHandler buildTLVHandler(byte type, short capacity) throws javacard.framework.SystemException
type - indicating the type of the Handlercapacity - the length of the internal buffer of the Handler.It corresponds to the maximum size of the TLV list managed by the handler.javacard.framework.SystemException - with the following reason code: ILLEGAL_VALUE capacityis negativeNO_RESOURCE if there are not enough resources in the card to allocate the handlerpublic static ViewHandler buildTLVHandler(byte type, short capacity, byte[] buffer, short offset, short length) throws java.lang.ArrayIndexOutOfBoundsException, javacard.framework.SystemException, java.lang.NullPointerException, ToolkitException
offset.
The internal buffer shall be at least length long.type - indicating the type of the Handlercapacity - the length of the internal buffer of the Handler. It corresponds to the maximum size of the TLV list managed by the handler.buffer - holding initialization data for the TLV Handler the content of this buffer will
be copied into the internal buffer of the handler and will be unchanged.offset - offset into the buffer indicating the start of the content that has to be copied into the internal buffer of the handlerlength - length of the content that has to be copied from the bufferjavacard.framework.SystemException - with the following reason code: ILLEGAL_VALUEcapacity is negativeNO_RESOURCE if there are not enough resources in the card to allocate the handlerjava.lang.NullPointerException - if buffer is nulljava.lang.ArrayIndexOutOfBoundsException - offset would cause access outside array bounds, or if length is negative.offset+length is greater than the length of the bufferToolkitException - with the following reason code: BAD_INPUT_PARAMETER if length is greater than capacity