uicc.system
Class HandlerBuilder

java.lang.Object
  extended by uicc.system.HandlerBuilder

public final class HandlerBuilder
extends java.lang.Object

The HandlerBuilder class is a class to create objects that are implementing TLV handler interfaces.


Field Summary
static byte BER_EDIT_HANDLER
           
static byte EDIT_HANDLER
           
 
Method Summary
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 bOffset, short bLength)
          Allocates a TLVHandler with an internal buffer of length capacity.
 
Methods inherited from class java.lang.Object
equals
 

Field Detail

EDIT_HANDLER

public static final byte EDIT_HANDLER
See Also:
Constant Field Values

BER_EDIT_HANDLER

public static final byte BER_EDIT_HANDLER
See Also:
Constant Field Values
Method Detail

buildTLVHandler

public static ViewHandler buildTLVHandler(byte type,
                                          short capacity)
                                   throws javacard.framework.SystemException
Allocates a TLVHandler with an internal buffer of length capacity

Parameters:
type - indicating the type of the Handler
capacity - the length of the internal buffer of the Handler.It corresponds to the maximum size of the TLV list managed by the handler.
Throws:
javacard.framework.SystemException - with the following reason code:
  • ILLEGAL_VALUE if the type does not match with the predefined values
  • if capacity is negative
  • NO_RESOURCE if there are not enough resources in the card to allocate the handler

  • buildTLVHandler

    public static ViewHandler buildTLVHandler(byte type,
                                              short capacity,
                                              byte[] buffer,
                                              short bOffset,
                                              short bLength)
                                       throws java.lang.ArrayIndexOutOfBoundsException,
                                              javacard.framework.SystemException,
                                              java.lang.NullPointerException,
                                              ToolkitException
    Allocates a TLVHandler with an internal buffer of length capacity. Copies the buffer content to an internal buffer of the TLVHandler starting at bOffset. The internal buffer shall be at least bLength long.

    Parameters:
    type - indicating the type of the Handler
    capacity - 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.
    bOffset - offset into the buffer inidcating the start of the content that has to be copied into the internal buffer of the handler
    bLength - length of the content that has to be copied from the buffer
    Throws:
    javacard.framework.SystemException - with the following reason code:
    • ILLEGAL_VALUE if the type does not match with the predefined values
  • if capacity is negative
  • NO_RESOURCE if there are not enough resources in the card to allocate the handler
    java.lang.NullPointerException - if buffer is null
    java.lang.ArrayIndexOutOfBoundsException -
    • if bOffset would cause access outside array bounds, or if bLength is negative.
  • if bOffset+bLength is greater than the length of the buffer
    ToolkitException - with the following reason code:
    • BAD_INPUT_PARAMETER if bLength is greater than capacity


  • Copyright © European Telecommunications Standards Institute 2004. All rights reserved.