FileDocCategorySizeDatePackage
InvalidJadException.javaAPI DocphoneME MR2 API (J2ME)12225Wed May 02 18:00:04 BST 2007com.sun.midp.installer

InvalidJadException

public class InvalidJadException extends IOException
Thrown when a downloaded JAD is discovered to be invalid. This includes this signed JAD's also. Since some of the conditions that cause this exception may be recovered from, this exception contains a specific RC (reason code) that so corrective action can be performed.

Fields Summary
public static final int
JAD_SERVER_NOT_FOUND
(1) The server for the JAD was not found.
public static final int
JAD_NOT_FOUND
(2) The JAD was not found.
public static final int
MISSING_PROVIDER_CERT
(4) The content provider certificate is missing.
public static final int
CORRUPT_PROVIDER_CERT
(5) The content provider certificate cannot be decoded.
public static final int
UNKNOWN_CA
(6) The CA that issued the content provider certificate is unknown. The extra data will be the CA's name as a String.
public static final int
INVALID_PROVIDER_CERT
(7) The signature of the content provider certificate is invalid. The extra data will be the subject's name as a String.
public static final int
CORRUPT_SIGNATURE
(8) The JAR signature cannot be decoded.
public static final int
INVALID_SIGNATURE
(9) The signature of the JAR is invalid.
public static final int
UNSUPPORTED_CERT
(10) The content provider certificate is a supported version.
public static final int
EXPIRED_PROVIDER_CERT
(11) The content provider certificate is expired. The extra data will be the subject's name as a String.
public static final int
EXPIRED_CA_KEY
(12) The CA's public key has expired. The extra data will be the CA's name as a String.
public static final int
MISSING_SUITE_NAME
(13) The name of MIDlet suite is missing.
public static final int
MISSING_VENDOR
(14) The vendor is missing.
public static final int
MISSING_VERSION
(15) The version is missing.
public static final int
INVALID_VERSION
(16) The format of the version is invalid.
public static final int
OLD_VERSION
(17) This suite is older that the one currently installed. The extra data is the installed version.
public static final int
MISSING_JAR_URL
(18) The URL for the JAR is missing.
public static final int
JAR_SERVER_NOT_FOUND
(19) The server for the JAR was not found at the URL given in the JAD. The extra data is the JAR URL.
public static final int
JAR_NOT_FOUND
(20) The JAR was not found at the URL given in the JAD. The extra data is the JAR URL.
public static final int
MISSING_JAR_SIZE
(21) The JAR size is missing.
public static final int
SUITE_NAME_MISMATCH
(25) The MIDlet suite name does not match the one in the JAR manifest.
public static final int
VERSION_MISMATCH
(26) The version does not match the one in the JAR manifest.
public static final int
VENDOR_MISMATCH
(27) The vendor does not match the one in the JAR manifest.
public static final int
INVALID_KEY
(28) A key for an attribute is not formatted correctly. The extra data is the key or the line of the attribute.
public static final int
INVALID_VALUE
(29) A value for an attribute is not formatted correctly. The extra data is the key of the attribute.
public static final int
INSUFFICIENT_STORAGE
(30) Not enough storage for this suite to be installed The extra data will be storage needed for the suite in K bytes rounded up.
public static final int
JAR_SIZE_MISMATCH
(31) The JAR downloaded was not size in the JAD.
public static final int
NEW_VERSION
(32) This suite is newer that the one currently installed. The extra data is the installed version.
public static final int
UNAUTHORIZED
(33) Webserver authentication required or failed.
public static final int
JAD_MOVED
(34) The JAD URL is for an installed suite but different than the original JAD URL. The extra data will be previous JAD URL.
public static final int
CANNOT_AUTH
(35) Server does not support basic authentication.
public static final int
CORRUPT_JAR
(36) An entry could not be read from the JAR. The extra data is the entry name.
public static final int
INVALID_JAD_TYPE
(37) The server did not hava a resource with the correct type (code 406) or the JAD downloaded has the wrong media type. In the second case the extra data is the Media-Type from the response.
public static final int
INVALID_JAR_TYPE
(38) The server did not hava a resource with the correct type (code 406) or the JAR downloaded has the wrong media type. In the second case the extra data is the Media-Type from the response.
public static final int
ALREADY_INSTALLED
(39) The JAD matches a version of a suite already installed. The extra data is the installed version.
public static final int
DEVICE_INCOMPATIBLE
(40) The device does not support either the configuration or profile in the JAD.
public static final int
MISSING_CONFIGURATION
(41) The configuration is missing from the manifest.
public static final int
MISSING_PROFILE
(42) The profile is missing from the manifest.
public static final int
INVALID_JAD_URL
(43) The JAD URL is invalid.
public static final int
INVALID_JAR_URL
(44) The JAR URL is invalid. The extra data is the JAR URL.
public static final int
PUSH_DUP_FAILURE
(45) The connection in a push entry is already taken. The extra data is the URL of the failed connection.
public static final int
PUSH_FORMAT_FAILURE
(46) The format of a push attribute has an invalid format. The extra data is the URL of the failed connection.
public static final int
PUSH_PROTO_FAILURE
(47) The connection in a push attribute is not supported. The extra data is the URL of the failed connection.
public static final int
PUSH_CLASS_FAILURE
(48) The class in a push attribute is not in MIDlet-<n> attribute. The extra data is the URL of the failed connection.
public static final int
AUTHORIZATION_FAILURE
(49) Application authorization failure. The extra data is the name of the permission.
public static final int
ATTRIBUTE_MISMATCH
(50) A attribute in both the JAD and JAR manifest does not match. For trusted suites only. The extra data is the name of the attribute.
public static final int
PROXY_AUTH
(51) Indicates that the user must first authenticate with the proxy.
public static final int
TRUSTED_OVERWRITE_FAILURE
(52) Indicates that the user tried to overwrite a trusted suite with an untrusted suite during an update. The extra data is the name of signer of the current version.
public static final int
TOO_MANY_PROPS
(53) Indicates that either the JAD or manifest has too many properties to fit into memory.
public static final int
INVALID_CONTENT_HANDLER
(54) The MicroEdition-Handler-<n> attribute has invalid values. The classname may be missing or there are too many fields
public static final int
CONTENT_HANDLER_CONFLICT
(55) The installation of a content handler would conflict with an already installed handler.
public static final int
JAR_CLASSES_VERIFICATION_FAILED
(56) Not all classes within JAR package can be successfully verified with class verifier.
public static final int
UNSUPPORTED_PAYMENT_INFO
(57) Indicates that the payment information provided with the MIDlet suite is incompatible with the current implementation.
public static final int
INVALID_PAYMENT_INFO
(58) Indicates that the payment information provided with the MIDlet suite is incomplete or incorrect.
public static final int
UNTRUSTED_PAYMENT_SUITE
(59) Indicates that the MIDlet suite has payment provisioning information but it is not trusted.
public static final int
CA_DISABLED
(60) Indicates that trusted CA for this suite has been disable for software authorization. The extra data contains the CA's name.
public static final int
UNSUPPORTED_CHAR_ENCODING
(61) Indicates that the character encoding specified in the MIME type is not supported.
private int
reason
The reason why this exception occurred.
private String
extraData
Extra data need to correct the problem.
Constructors Summary
public InvalidJadException(int theReason)
Constructs a InvalidJadException with the specified reason.

param
theReason specific RC (reason code)


                      
       
        super("Reason = " + theReason);
        reason = theReason;
    
public InvalidJadException(int theReason, String theExtraData)
Constructs a InvalidJadException with the specified reason and extra data.

param
theReason specific reason code
param
theExtraData an object that contains data to solve the problem

        this(theReason);
        extraData = theExtraData;
    
Methods Summary
public java.lang.StringgetExtraData()
Returns an extra data String to help to resolve the problem.

return
extra data string, may be null, type depends on the reason for the exception

        return extraData;
    
public intgetReason()
Returns specific reason why the exception was thrown.

return
the RC (reason code)

        return reason;