MifareClassicCard Class Reference

MifareClassic card. More...

Inheritance diagram for MifareClassicCard:

Classes

enum  Capacity
 MifareClassic Capacity. More...
 

Public Member Functions

Capacity getCapacity ()
 
List< SmartCardInformationBlockwriteBlocksForceKey (List< Entry< SmartCardInformationBlock, KeyType >> blocks) throws SmartCardNotAvailableException, SmartCardLowLevelException
 
List< SmartCardInformationBlockreadBlocksForceKey (List< Entry< Integer, KeyType >> blockIds) throws SmartCardNotAvailableException, SmartCardLowLevelException
 
List< SmartCardInformationBlockreadBlocksForcePriority (List< Entry< Integer, Integer >> blockIds) throws SmartCardNotAvailableException, SmartCardLowLevelException
 
List< SmartCardInformationBlockwriteBlocks (List< SmartCardInformationBlock > blocks) throws SmartCardNotAvailableException, SmartCardLowLevelException
 
List< SmartCardInformationBlockreadBlocks (List< Integer > blockIds) throws SmartCardNotAvailableException, SmartCardLowLevelException
 
Map< Integer, Boolean > transferBlocks (List< SmartCardArithmeticBlock > blocks) throws SmartCardNotAvailableException, SmartCardLowLevelException
 
Map< Integer, Boolean > restoreBlocks (List< SmartCardArithmeticBlock > blocks) throws SmartCardNotAvailableException, SmartCardLowLevelException
 
Map< Integer, Boolean > incrementOnlyBlocks (List< SmartCardArithmeticBlock > blocks) throws SmartCardNotAvailableException, SmartCardLowLevelException
 
Map< Integer, Boolean > decrementOnlyBlocks (List< SmartCardArithmeticBlock > blocks) throws SmartCardNotAvailableException, SmartCardLowLevelException
 
Map< Integer, Boolean > incrementBlocks (List< SmartCardArithmeticBlock > blocks) throws SmartCardNotAvailableException, SmartCardLowLevelException
 
Map< Integer, Boolean > decrementBlocks (List< SmartCardArithmeticBlock > blocks) throws SmartCardNotAvailableException, SmartCardLowLevelException
 
- Public Member Functions inherited from SmartCard
String getUid ()
 
Boolean getCollision ()
 
SmartCardReader getReader ()
 
List< String > sendPasstroughCommands (List< String > commands) throws SmartCardNotAvailableException, SmartCardLowLevelException
 

Detailed Description

MifareClassic card

Member Function Documentation

Map<Integer, Boolean> decrementBlocks ( List< SmartCardArithmeticBlock blocks) throws SmartCardNotAvailableException, SmartCardLowLevelException

Decrement blocks in card

Parameters
blockslist to be transferred
Returns
Map with every result related with its blockId
Exceptions
SmartCardLowLevelException
SmartCardNotAvailableException
Map<Integer, Boolean> decrementOnlyBlocks ( List< SmartCardArithmeticBlock blocks) throws SmartCardNotAvailableException, SmartCardLowLevelException

Decrement only blocks in card

Parameters
blockslist to be transferred
Returns
Map with every result related with its blockId
Exceptions
SmartCardLowLevelException
SmartCardNotAvailableException
Capacity getCapacity ( )

Gets card capacity

Returns
list of MifareClassic blocks
Map<Integer, Boolean> incrementBlocks ( List< SmartCardArithmeticBlock blocks) throws SmartCardNotAvailableException, SmartCardLowLevelException

Increment blocks in card

Parameters
blockslist to be transferred
Returns
Map with every result related with its blockId
Exceptions
SmartCardLowLevelException
SmartCardNotAvailableException
Map<Integer, Boolean> incrementOnlyBlocks ( List< SmartCardArithmeticBlock blocks) throws SmartCardNotAvailableException, SmartCardLowLevelException

Increment only blocks in card

Parameters
blockslist to be transferred
Returns
Map with every result related with its blockId
Exceptions
SmartCardLowLevelException
SmartCardNotAvailableException
List<SmartCardInformationBlock> readBlocks ( List< Integer >  blockIds) throws SmartCardNotAvailableException, SmartCardLowLevelException

Read blocks from card

Parameters
blockIdsblock ids to be read
Returns
list of MifareClassic blocks
Exceptions
SmartCardLowLevelException
SmartCardNotAvailableException
List<SmartCardInformationBlock> readBlocksForceKey ( List< Entry< Integer, KeyType >>  blockIds) throws SmartCardNotAvailableException, SmartCardLowLevelException

Read blocks from card forcing used key (Deprecated, use readBlocksForcePriority instead)

Parameters
blockIdsblock ids to be read and key to be used in each block
Returns
list of MifareClassic blocks
Exceptions
SmartCardLowLevelException
SmartCardNotAvailableException
List<SmartCardInformationBlock> readBlocksForcePriority ( List< Entry< Integer, Integer >>  blockIds) throws SmartCardNotAvailableException, SmartCardLowLevelException

Read blocks from card forcing used priority

Parameters
blockIdsblock ids to be read and priority to be used in each block
Returns
list of MifareClassic blocks
Exceptions
SmartCardLowLevelException
SmartCardNotAvailableException
Map<Integer, Boolean> restoreBlocks ( List< SmartCardArithmeticBlock blocks) throws SmartCardNotAvailableException, SmartCardLowLevelException

Restore blocks in card

Parameters
blockslist to be transferred
Returns
Map with every result related with its blockId
Exceptions
SmartCardLowLevelException
SmartCardNotAvailableException
Map<Integer, Boolean> transferBlocks ( List< SmartCardArithmeticBlock blocks) throws SmartCardNotAvailableException, SmartCardLowLevelException

Transfer blocks in card

Parameters
blockslist to be transferred
Returns
Map with every result related with its blockId
Exceptions
SmartCardLowLevelException
SmartCardNotAvailableException

Write blocks in card

Parameters
blockslist to be written
Returns
blocks list with result
Exceptions
SmartCardLowLevelException
SmartCardNotAvailableException

Write blocks in card forcing used key (Deprecated, use writeBlocks using SmartCardInformationBlock.priority field instead)

Parameters
blockslist to be written and key to be used in each block
Returns
blocks list with result
Exceptions
SmartCardLowLevelException
SmartCardNotAvailableException