Nokia Extensions for JSR-257

com.nokia.nfc.nxp.mfstd
Interface MFSector

All Superinterfaces:
MFDataArea

public interface MFSector
extends MFDataArea

Provides access to sectors within Mifare Standard Cards.

The sector consists of data blocks and a special sector trailer block. Exception to previous is the first block within the card - the manufacturer block. The manufacturer block is write protected.

All write operations performed on the sector directly affect to the contents of contained blocks.

See Also:
MFDataArea

Method Summary
 MFBlock getBlock(int blockIndex)
          Returns the block at the specified block index.
 int getBlockCount()
          Returns the number of blocks within this sector.
 int getSectorIndex()
          Returns the index of this sector within the Mifare Card.
 MFSectorTrailer getSectorTrailer()
          Returns the trailer block of this sector.
 
Methods inherited from interface com.nokia.nfc.nxp.mfstd.MFDataArea
read, size, toString, write, write
 

Method Detail

getSectorIndex

int getSectorIndex()
Returns the index of this sector within the Mifare Card. The return value ranges from 0 to MFStandardConnection.getSectorCount() - 1.

Returns:
the index of this sector as an positive.

getBlockCount

int getBlockCount()
Returns the number of blocks within this sector. All sectors in Mifare Standard 1k cards have 4 blocks per sector and in 4k cards the last 8 sectors have 16 blocks.

Returns:
the number of blocks within this sector.

getBlock

MFBlock getBlock(int blockIndex)
Returns the block at the specified block index. Valid block index ranges from 0 to getBlockCount() - 1. The returned block object can be an instance of MFManufacturerBlock.

Parameters:
blockIndex - the block index.
Returns:
a MFBlock object that represents the specified block.
Throws:
java.lang.IllegalArgumentException - if the block index is not valid.

getSectorTrailer

MFSectorTrailer getSectorTrailer()
Returns the trailer block of this sector.

Returns:
the sector trailer block.

Nokia Extensions for JSR-257

Copyright � 2010 Nokia Corporation. All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.