org.opennfc
Enum NfcErrorCode

Object
  extended by Enum<NfcErrorCode>
      extended by org.opennfc.NfcErrorCode
All Implemented Interfaces:
Serializable, Comparable<NfcErrorCode>

public enum NfcErrorCode
extends Enum<NfcErrorCode>

The specific constants of the error code values used with the NFC methods.

Since:
Open NFC 4.0

Enum Constant Summary
BAD_FIRMWARE_FORMAT
          An error is detected in the format of the firmware update buffer.
BAD_FIRMWARE_SIGNATURE
          The signature of the firmware update buffer is not valid.
BAD_FIRMWARE_VERSION
          The firmware is not compliant with the NFC Controller type or with the NFC HAL implementation.
BAD_HANDLE
          A bad handle value is detected.
BAD_NDEF_FORMAT
          A NDEF message is ill-formatted.
BAD_NFCC_MODE
          The method cannot be executed in the current mode of the NFC Controller.
BAD_PARAMETER
          A wrong value is detected for a parameter.
BAD_STATE
          A method cannot be executed because the current sate is no valid for this execution.
BAD_TAG_FORMAT
          A tag is ill-formatted.
BUFFER_TOO_LARGE
          The buffer specified in input is too large.
BUFFER_TOO_SHORT
          The buffer specified in output to receive a result is too short.
CANCEL
          An asynchronous operation is not performed because it was canceled.
CLIENT_SERVER_COMMUNICATION
          An error is detected in the client-server communication.
CLIENT_SERVER_PROTOCOL
          An error is detected in the client-server protocol.
CONNECTION_COMPATIBILITY
          The connection is not compliant with a protocol requested to execute a function.
DRIVER
          Error returned by the driver.
DURING_FIRMWARE_BOOT
          The firmware does not boot correctly.
DURING_HARDWARE_BOOT
          The hardware does not boot correctly.
EXCLUSIVE_REJECTED
          The exclusive access is rejected because there is already another registration for this type.
FEATURE_NOT_SUPPORTED
          The requested feature is not supported.
FUNCTION_NOT_SUPPORTED
          The method is not supported by the current version of the implementation.
HETEROGENEOUS_DATA
          Unable to provide the requested information, typically due to non existence of a unique value valid for all the specified range.
INDEX_OUT_OF_RANGE
          An index value is out of the valid range for this type of index.
ITEM_LOCKED
          The lock or write operation failed because the specified item is locked.
ITEM_NOT_FOUND
          The specified item is not found.
LOCKED_TAG
          A write operation failed because the tag is locked or protected against writing operation.
MISSING_INFO
          Error caused by a missing information.
NDEF_UNKNOWN
          The NDEF message type is unknown.
NFC_HAL_COMMUNICATION
          An error in the NFC HAL protocol is detected.
NFCC_COMMUNICATION
          Error in the communication with the NFC Controller in the NFC HAL implementation.
NO_EVENT
          No event is available in the event queue.
OUT_OF_RESOURCE
          Resources are missing to perform the operation.
P2P_CLIENT_REJECTED
          The remote device rejects the connection attempt from the local Peer to Peer client.
PERSISTENT_DATA
          An error is detected when writing data in persistent memory.
PROGRAMMING
          A programming error is detected.
RETRY
          Temporary error code, the caller should retry the call.
RF_COMMUNICATION
          Error in the communication on the RF interface.
RF_PROTOCOL_NOT_SUPPORTED
          The specified protocol is not supported.
SECURITY
          A security error is detected.
SHARE_REJECTED
          The shared access is rejected because there is already an exclusive registration for this type.
SYNC_OBJECT
          An error is returned by a synchronization function of the OS.
TAG_DATA_INTEGRITY
          The communication failed because a fault in the data integrity is detected.
TAG_FULL
          A write operation failed because the tag has insufficient free space.
TAG_NOT_LOCKABLE
          The lock operation failed because the tag is not lockable.
TAG_WRITE
          An error is detected in the data written into a tag.
TIMEOUT
          The communication failed because a timeout expired.
TOO_MANY_HANDLERS
          This error is returned by a registering method when the maximum number of handlers is reached.
UICC_COMMUNICATION
          The UICC is not present in the slot or an error occurred during the communication with the UICC.
VERSION_NOT_SUPPORTED
          The implementation does not support the requested version of the APIs.
WAIT_CANCELLED
          A wait operation is canceled.
WRONG_RTD
          A record does not have the expected RTD.
 
Method Summary
static NfcErrorCode getCode(int value)
          Returns the error code corresponding to a value.
static NfcErrorCode valueOf(String name)
          Returns the enum constant of this type with the specified name.
static NfcErrorCode[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

VERSION_NOT_SUPPORTED

public static final NfcErrorCode VERSION_NOT_SUPPORTED
The implementation does not support the requested version of the APIs.


ITEM_NOT_FOUND

public static final NfcErrorCode ITEM_NOT_FOUND
The specified item is not found.


BUFFER_TOO_SHORT

public static final NfcErrorCode BUFFER_TOO_SHORT
The buffer specified in output to receive a result is too short.


PERSISTENT_DATA

public static final NfcErrorCode PERSISTENT_DATA
An error is detected when writing data in persistent memory.


NO_EVENT

public static final NfcErrorCode NO_EVENT
No event is available in the event queue.


WAIT_CANCELLED

public static final NfcErrorCode WAIT_CANCELLED
A wait operation is canceled.


UICC_COMMUNICATION

public static final NfcErrorCode UICC_COMMUNICATION
The UICC is not present in the slot or an error occurred during the communication with the UICC.


BAD_HANDLE

public static final NfcErrorCode BAD_HANDLE
A bad handle value is detected.


EXCLUSIVE_REJECTED

public static final NfcErrorCode EXCLUSIVE_REJECTED
The exclusive access is rejected because there is already another registration for this type.


SHARE_REJECTED

public static final NfcErrorCode SHARE_REJECTED
The shared access is rejected because there is already an exclusive registration for this type.


BAD_PARAMETER

public static final NfcErrorCode BAD_PARAMETER
A wrong value is detected for a parameter.


RF_PROTOCOL_NOT_SUPPORTED

public static final NfcErrorCode RF_PROTOCOL_NOT_SUPPORTED
The specified protocol is not supported.


CONNECTION_COMPATIBILITY

public static final NfcErrorCode CONNECTION_COMPATIBILITY
The connection is not compliant with a protocol requested to execute a function.


BUFFER_TOO_LARGE

public static final NfcErrorCode BUFFER_TOO_LARGE
The buffer specified in input is too large.


INDEX_OUT_OF_RANGE

public static final NfcErrorCode INDEX_OUT_OF_RANGE
An index value is out of the valid range for this type of index.


OUT_OF_RESOURCE

public static final NfcErrorCode OUT_OF_RESOURCE
Resources are missing to perform the operation.


BAD_TAG_FORMAT

public static final NfcErrorCode BAD_TAG_FORMAT
A tag is ill-formatted.


BAD_NDEF_FORMAT

public static final NfcErrorCode BAD_NDEF_FORMAT
A NDEF message is ill-formatted.


NDEF_UNKNOWN

public static final NfcErrorCode NDEF_UNKNOWN
The NDEF message type is unknown.


LOCKED_TAG

public static final NfcErrorCode LOCKED_TAG
A write operation failed because the tag is locked or protected against writing operation.


TAG_FULL

public static final NfcErrorCode TAG_FULL
A write operation failed because the tag has insufficient free space.


CANCEL

public static final NfcErrorCode CANCEL
An asynchronous operation is not performed because it was canceled.


TIMEOUT

public static final NfcErrorCode TIMEOUT
The communication failed because a timeout expired.


TAG_DATA_INTEGRITY

public static final NfcErrorCode TAG_DATA_INTEGRITY
The communication failed because a fault in the data integrity is detected.


NFC_HAL_COMMUNICATION

public static final NfcErrorCode NFC_HAL_COMMUNICATION
An error in the NFC HAL protocol is detected.


WRONG_RTD

public static final NfcErrorCode WRONG_RTD
A record does not have the expected RTD.


TAG_WRITE

public static final NfcErrorCode TAG_WRITE
An error is detected in the data written into a tag.


BAD_NFCC_MODE

public static final NfcErrorCode BAD_NFCC_MODE
The method cannot be executed in the current mode of the NFC Controller.


TOO_MANY_HANDLERS

public static final NfcErrorCode TOO_MANY_HANDLERS
This error is returned by a registering method when the maximum number of handlers is reached.


BAD_STATE

public static final NfcErrorCode BAD_STATE
A method cannot be executed because the current sate is no valid for this execution.


BAD_FIRMWARE_FORMAT

public static final NfcErrorCode BAD_FIRMWARE_FORMAT
An error is detected in the format of the firmware update buffer.


BAD_FIRMWARE_SIGNATURE

public static final NfcErrorCode BAD_FIRMWARE_SIGNATURE
The signature of the firmware update buffer is not valid.


DURING_HARDWARE_BOOT

public static final NfcErrorCode DURING_HARDWARE_BOOT
The hardware does not boot correctly.


DURING_FIRMWARE_BOOT

public static final NfcErrorCode DURING_FIRMWARE_BOOT
The firmware does not boot correctly.


FEATURE_NOT_SUPPORTED

public static final NfcErrorCode FEATURE_NOT_SUPPORTED
The requested feature is not supported.


CLIENT_SERVER_PROTOCOL

public static final NfcErrorCode CLIENT_SERVER_PROTOCOL
An error is detected in the client-server protocol.


FUNCTION_NOT_SUPPORTED

public static final NfcErrorCode FUNCTION_NOT_SUPPORTED
The method is not supported by the current version of the implementation.


TAG_NOT_LOCKABLE

public static final NfcErrorCode TAG_NOT_LOCKABLE
The lock operation failed because the tag is not lockable.


ITEM_LOCKED

public static final NfcErrorCode ITEM_LOCKED
The lock or write operation failed because the specified item is locked.


SYNC_OBJECT

public static final NfcErrorCode SYNC_OBJECT
An error is returned by a synchronization function of the OS.


RETRY

public static final NfcErrorCode RETRY
Temporary error code, the caller should retry the call.


DRIVER

public static final NfcErrorCode DRIVER
Error returned by the driver.


MISSING_INFO

public static final NfcErrorCode MISSING_INFO
Error caused by a missing information.


P2P_CLIENT_REJECTED

public static final NfcErrorCode P2P_CLIENT_REJECTED
The remote device rejects the connection attempt from the local Peer to Peer client.


NFCC_COMMUNICATION

public static final NfcErrorCode NFCC_COMMUNICATION
Error in the communication with the NFC Controller in the NFC HAL implementation.


RF_COMMUNICATION

public static final NfcErrorCode RF_COMMUNICATION
Error in the communication on the RF interface. At any level of the protocol.


BAD_FIRMWARE_VERSION

public static final NfcErrorCode BAD_FIRMWARE_VERSION
The firmware is not compliant with the NFC Controller type or with the NFC HAL implementation.


HETEROGENEOUS_DATA

public static final NfcErrorCode HETEROGENEOUS_DATA
Unable to provide the requested information, typically due to non existence of a unique value valid for all the specified range.


CLIENT_SERVER_COMMUNICATION

public static final NfcErrorCode CLIENT_SERVER_COMMUNICATION
An error is detected in the client-server communication.


SECURITY

public static final NfcErrorCode SECURITY
A security error is detected.


PROGRAMMING

public static final NfcErrorCode PROGRAMMING
A programming error is detected.

Method Detail

values

public static NfcErrorCode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (NfcErrorCode c : NfcErrorCode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static NfcErrorCode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getCode

public static NfcErrorCode getCode(int value)
Returns the error code corresponding to a value.

Parameters:
value - the error value.
Returns:
the error code.

Copyright © 2010-2011 Inside Secure
Except as noted, this content is licensed under Apache 2.0 License.