Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.javacard.spi.cardmgmt
Class DeploymentUnitLoader

    java.lang.Object
      com.sun.javacard.spi.cardmgmt.DeploymentUnitLoader

    @TransactionType(value=NOT_SUPPORTED)
    public final class DeploymentUnitLoader

extends Object

The DeploymentUnitLoader class allows the card management application to load deployment units.

The DeploymentUnitLoader object is a permanent Java Card runtime environment Entry Point Objects.

Some operations of the deployment unit loader are subject to permission checks.

Since:
  Java Card 3.0
See Also:
  `DeploymentUnit`, `CardManagementPermission`, `JCREPermission`

Method Summary
`static DeploymentUnitLoader` | `getDeploymentUnitLoader()` Retrieves the deployment unit loader.
`Enumeration<DeploymentUnit>` | `getLoadedDeploymentUnits()` Returns an enumeration of all currently loaded deployment units.
`Enumeration<DeploymentUnit>` | `getLoadedDeploymentUnits(byte type)` Returns an enumeration of all currently loaded deployment units of the specified type.
`DeploymentUnit` | `load(byte type, InputStream inputStream)` Loads a deployment unit of the specified type from the specified input stream.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getDeploymentUnitLoader

    public static DeploymentUnitLoader getDeploymentUnitLoader()

  Retrieves the deployment unit loader.

  Returns:
    the Java Card RE-owned DeploymentUnitLoader singleton instance.

### getLoadedDeploymentUnits

    public Enumeration<DeploymentUnit> getLoadedDeploymentUnits()

  Returns an enumeration of all currently loaded deployment units.

  Returns:
    an enumeration of all currently loaded deployment units.

### getLoadedDeploymentUnits

    public Enumeration<DeploymentUnit> getLoadedDeploymentUnits(byte type)

  Returns an enumeration of all currently loaded deployment units of the specified type.

  Parameters:
    `type` - the type of the deployment unit to be loaded.
  Returns:
    an enumeration of all currently loaded deployment units.
  Throws:
    `IllegalArgumentException` - if `type` is not a legal type. See `ApplicationGroup` and `Library`

### load

    public DeploymentUnit load(byte type,
                               InputStream inputStream)
                        throws IOException,
                               DeploymentException

  Loads a deployment unit of the specified type from the specified input stream. The loader uses the type argument to anticipate the proper class loader to use to load the classes. This type must correspond to the actual type of deployment unit read from the input stream.

  Parameters:
    `type` - the type of the deployment unit to be loaded.
    `inputStream` - the inputStream from which the deployment unit JAR is to be read.
  Returns:
    The loaded deployment unit.
  Throws:
    `NullPointerException` - if `inputStream` is null.
    `IllegalArgumentException` -
    - if `type` is not a legal type. See `ApplicationGroup` and `Library`
    - if the deployment unit loaded from the input stream is not of the specified type.
    `IOException` - if an IO exception occurs while reading the input stream.
    `DeploymentException` - if any other exception or error occurs during loading.
    `SecurityException` - if loading a deployment unit is not granted.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.