com.ibm.jc
Class RemoteException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended bycom.ibm.jc.RemoteException
All Implemented Interfaces:
java.io.Serializable

public class RemoteException
extends java.lang.RuntimeException

Abstraction encapsulating JavaCard RMI exceptions including both, API defined exceptions as well as user defined exceptions.

See Also:
Serialized Form

Field Summary
 boolean isUserDefined
          True if this represents a user defined exception, a JavaCard API defined exception otherwise.
 int reasonCode
          JavaCard exception reason code, or zero for java.lang, java.rmi, or java.io (or subclasses of them if this is a user defined exception).
 int type
          Indicates the type of JavaCard API exception.
static int TYPE_APDU_EXCEPTION
          Exception type: java.framework.APDUException
static int TYPE_ARITHMETIC_EXCEPTION
          Exception type: java.lang.ArithmeticException
static int TYPE_ARRAY_INDEX_OUT_OF_BOUNDS_EXCEPTION
          Exception type: java.lang.ArrayIndexOutOfBoundsException
static int TYPE_ARRAY_STORE_EXCEPTION
          Exception type: java.lang.ArrayStoreException
static int TYPE_CARD_EXCEPTION
          Exception type: java.framework.CardException
static int TYPE_CARD_RUNTIME_EXCEPTION
          Exception type: java.framework.CardRuntimeException
static int TYPE_CLASS_CAST_EXCEPTION
          Exception type: java.lang.ClassCastException
static int TYPE_CRYPTO_EXCEPTION
          Exception type: java.security.CryptoException
static int TYPE_EXCEPTION
          Exception type: java.lang.Exception
static int TYPE_INDEX_OUT_OF_BOUNDS_EXCEPTION
          Exception type: java.lang.IndexOutOfBoundsException
static int TYPE_IO_EXCEPTION
          Exception type: java.io.IOException
static int TYPE_ISO_EXCEPTION
          Exception type: java.framework.ISOException
static int TYPE_NEGATIVE_ARRAY_SIZE_EXCEPTION
          Exception type: java.lang.NegativeArraySizeException
static int TYPE_NULL_POINTER_EXCEPTION
          Exception type: java.lang.NullPointerException
static int TYPE_PIN_EXCEPTION
          Exception type: java.framework.PINException
static int TYPE_REMOTE_EXCEPTION
          Exception type: java.rmi.RemoteException
static int TYPE_RUNTIME_EXCEPTION
          Exception type: java.lang.RuntimeException
static int TYPE_SECURITY_EXCEPTION
          Exception type: java.lang.SecurityException
static int TYPE_SERVICE_EXCEPTION
          Exception type: java.framework.service.ServiceException
static int TYPE_SYSTEM_EXCEPTION
          Exception type: java.framework.SystemException
static int TYPE_THROWABLE
          Exception type: java.lang.Throwable
static int TYPE_TRANSACTION_EXCEPTION
          Exception type: java.framework.TransactionException
static int TYPE_USER_EXCEPTION
          Exception type: java.framework.UserException
 
Constructor Summary
RemoteException(boolean isUserDefined, int reasonCode, int type, java.lang.String message)
          Creates a RemoteException object from the given information.
RemoteException(byte[] exception, int offset, java.lang.String message)
          Creates a RemoteException object by decoding the given exception response.
 
Method Summary
 java.lang.String toString()
           
 java.lang.String typeString()
          Returns the type of JavaCard API exception as string.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE_THROWABLE

public static final int TYPE_THROWABLE
Exception type: java.lang.Throwable

See Also:
Constant Field Values

TYPE_ARITHMETIC_EXCEPTION

public static final int TYPE_ARITHMETIC_EXCEPTION
Exception type: java.lang.ArithmeticException

See Also:
Constant Field Values

TYPE_ARRAY_INDEX_OUT_OF_BOUNDS_EXCEPTION

public static final int TYPE_ARRAY_INDEX_OUT_OF_BOUNDS_EXCEPTION
Exception type: java.lang.ArrayIndexOutOfBoundsException

See Also:
Constant Field Values

TYPE_ARRAY_STORE_EXCEPTION

public static final int TYPE_ARRAY_STORE_EXCEPTION
Exception type: java.lang.ArrayStoreException

See Also:
Constant Field Values

TYPE_CLASS_CAST_EXCEPTION

public static final int TYPE_CLASS_CAST_EXCEPTION
Exception type: java.lang.ClassCastException

See Also:
Constant Field Values

TYPE_EXCEPTION

public static final int TYPE_EXCEPTION
Exception type: java.lang.Exception

See Also:
Constant Field Values

TYPE_INDEX_OUT_OF_BOUNDS_EXCEPTION

public static final int TYPE_INDEX_OUT_OF_BOUNDS_EXCEPTION
Exception type: java.lang.IndexOutOfBoundsException

See Also:
Constant Field Values

TYPE_NEGATIVE_ARRAY_SIZE_EXCEPTION

public static final int TYPE_NEGATIVE_ARRAY_SIZE_EXCEPTION
Exception type: java.lang.NegativeArraySizeException

See Also:
Constant Field Values

TYPE_NULL_POINTER_EXCEPTION

public static final int TYPE_NULL_POINTER_EXCEPTION
Exception type: java.lang.NullPointerException

See Also:
Constant Field Values

TYPE_RUNTIME_EXCEPTION

public static final int TYPE_RUNTIME_EXCEPTION
Exception type: java.lang.RuntimeException

See Also:
Constant Field Values

TYPE_SECURITY_EXCEPTION

public static final int TYPE_SECURITY_EXCEPTION
Exception type: java.lang.SecurityException

See Also:
Constant Field Values

TYPE_IO_EXCEPTION

public static final int TYPE_IO_EXCEPTION
Exception type: java.io.IOException

See Also:
Constant Field Values

TYPE_REMOTE_EXCEPTION

public static final int TYPE_REMOTE_EXCEPTION
Exception type: java.rmi.RemoteException

See Also:
Constant Field Values

TYPE_APDU_EXCEPTION

public static final int TYPE_APDU_EXCEPTION
Exception type: java.framework.APDUException

See Also:
Constant Field Values

TYPE_CARD_EXCEPTION

public static final int TYPE_CARD_EXCEPTION
Exception type: java.framework.CardException

See Also:
Constant Field Values

TYPE_CARD_RUNTIME_EXCEPTION

public static final int TYPE_CARD_RUNTIME_EXCEPTION
Exception type: java.framework.CardRuntimeException

See Also:
Constant Field Values

TYPE_ISO_EXCEPTION

public static final int TYPE_ISO_EXCEPTION
Exception type: java.framework.ISOException

See Also:
Constant Field Values

TYPE_PIN_EXCEPTION

public static final int TYPE_PIN_EXCEPTION
Exception type: java.framework.PINException

See Also:
Constant Field Values

TYPE_SYSTEM_EXCEPTION

public static final int TYPE_SYSTEM_EXCEPTION
Exception type: java.framework.SystemException

See Also:
Constant Field Values

TYPE_TRANSACTION_EXCEPTION

public static final int TYPE_TRANSACTION_EXCEPTION
Exception type: java.framework.TransactionException

See Also:
Constant Field Values

TYPE_USER_EXCEPTION

public static final int TYPE_USER_EXCEPTION
Exception type: java.framework.UserException

See Also:
Constant Field Values

TYPE_CRYPTO_EXCEPTION

public static final int TYPE_CRYPTO_EXCEPTION
Exception type: java.security.CryptoException

See Also:
Constant Field Values

TYPE_SERVICE_EXCEPTION

public static final int TYPE_SERVICE_EXCEPTION
Exception type: java.framework.service.ServiceException

See Also:
Constant Field Values

isUserDefined

public boolean isUserDefined
True if this represents a user defined exception, a JavaCard API defined exception otherwise.


reasonCode

public int reasonCode
JavaCard exception reason code, or zero for java.lang, java.rmi, or java.io (or subclasses of them if this is a user defined exception).


type

public int type
Indicates the type of JavaCard API exception. If this is a user defined exception it the closest API defined exception is indicated.

See Also:
TYPE_THROWABLE, TYPE_ARITHMETIC_EXCEPTION, TYPE_ARRAY_INDEX_OUT_OF_BOUNDS_EXCEPTION, TYPE_ARRAY_STORE_EXCEPTION, TYPE_CLASS_CAST_EXCEPTION, TYPE_EXCEPTION, TYPE_INDEX_OUT_OF_BOUNDS_EXCEPTION, TYPE_NEGATIVE_ARRAY_SIZE_EXCEPTION, TYPE_NULL_POINTER_EXCEPTION, TYPE_RUNTIME_EXCEPTION, TYPE_SECURITY_EXCEPTION, TYPE_IO_EXCEPTION, TYPE_REMOTE_EXCEPTION, TYPE_APDU_EXCEPTION, TYPE_CARD_EXCEPTION, TYPE_CARD_RUNTIME_EXCEPTION, TYPE_ISO_EXCEPTION, TYPE_PIN_EXCEPTION, TYPE_SYSTEM_EXCEPTION, TYPE_TRANSACTION_EXCEPTION, TYPE_USER_EXCEPTION, TYPE_CRYPTO_EXCEPTION, TYPE_SERVICE_EXCEPTION, #typeToString
Constructor Detail

RemoteException

public RemoteException(boolean isUserDefined,
                       int reasonCode,
                       int type,
                       java.lang.String message)
Creates a RemoteException object from the given information.

Parameters:
isUserDefined - True if this is a user defined exception, fals if it is an API defined exception.
reasonCode - JavaCard exception reason code.
type - The exception type
message - Some message or null.

RemoteException

public RemoteException(byte[] exception,
                       int offset,
                       java.lang.String message)
Creates a RemoteException object by decoding the given exception response.

Parameters:
exception - Array holding the exception response. This might be an exception_response (API exception) or an exception_subclass_response (user defined exception) as defined in JavaCard 2.2.1.
offset - Offset into exception.
message - Some message or null.
Throws:
JCException - If an error occurs while decoding the exception response.
Method Detail

typeString

public java.lang.String typeString()
Returns the type of JavaCard API exception as string.

Returns:
exception type string (e.g. java.lang.ArrayIndexOutOfBoundsException).

toString

public java.lang.String toString()