Use is subject to License Terms. Your use of this web site or any of its contents or software indicates your agreement to be bound by these License Terms.

Copyright © 2006 Sun Microsystems, Inc. All rights reserved.

Java™ 2 Platform, Micro Edition Content Handler API (Final Release, June 3, 2005)

javax.microedition.content
Class ContentHandlerException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.io.IOException
              extended byjavax.microedition.content.ContentHandlerException

public class ContentHandlerException
extends java.io.IOException

A ContentHandlerException is thrown to report errors specific to registration and invocation of content handlers. Instances are immutable and thread safe.


Field Summary
static int AMBIGUOUS
          The reason is AMBIGUOUS in a ContentHandlerException when an ID does not uniquely identify a single content handler application.
static int NO_REGISTERED_HANDLER
          The reason is NO_REGISTERED_HANDLER in a ContentHandlerException when there is no content handler registered of the requested combination of ID, type, suffix, and action.
static int TYPE_UNKNOWN
          The reason is TYPE_UNKNOWN in a ContentHandlerException when the type is not available.
 
Constructor Summary
ContentHandlerException(java.lang.String reason, int errcode)
          Constructs a ContentHandlerException with a reason and error code.
 
Method Summary
 int getErrorCode()
          Returns the error code for the exception.
 
Methods inherited from class java.lang.Throwable
getMessage, printStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_REGISTERED_HANDLER

public static final int NO_REGISTERED_HANDLER
The reason is NO_REGISTERED_HANDLER in a ContentHandlerException when there is no content handler registered of the requested combination of ID, type, suffix, and action.

See Also:
Constant Field Values

TYPE_UNKNOWN

public static final int TYPE_UNKNOWN
The reason is TYPE_UNKNOWN in a ContentHandlerException when the type is not available.

See Also:
Constant Field Values

AMBIGUOUS

public static final int AMBIGUOUS
The reason is AMBIGUOUS in a ContentHandlerException when an ID does not uniquely identify a single content handler application.

See Also:
Constant Field Values
Constructor Detail

ContentHandlerException

public ContentHandlerException(java.lang.String reason,
                               int errcode)
Constructs a ContentHandlerException with a reason and error code. The error message string reason can later be retrieved by the java.lang.Throwable.getMessage method.

Parameters:
reason - the reason for the exception
errcode - the error code; one of NO_REGISTERED_HANDLER, AMBIGUOUS, or TYPE_UNKNOWN
Throws:
java.lang.IllegalArgumentException - if errcode is not one of NO_REGISTERED_HANDLER, AMBIGUOUS, or TYPE_UNKNOWN
Method Detail

getErrorCode

public int getErrorCode()
Returns the error code for the exception.

Returns:
the error code; one of NO_REGISTERED_HANDLER, AMBIGUOUS, or TYPE_UNKNOWN

Java™ 2 Platform, Micro Edition Content Handler API (Final Release, June 3, 2005)

Copyright © 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to License Terms. Your use of this web site or any of its content or software indicates your agreement to be bound by these License Terms.

For more information, please consult the JSR 211 specification.