|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@TransactionType(value=NOT_SUPPORTED) public interface MemoryAccess
This interface provides methods to read and write the external memory space. Note that it is up to the implementation to ensure that no instance of this interface can ever be created or used to access memory that is directly accessed and managed by the Java Card RE for code, heap and other data structures.
An instance of this interface suitable for the available external memory
subsystem can be obtained via the Memory
class.
Memory.getMemoryAccessInstance( byte, short[], short )
Method Summary | |
---|---|
short |
readData(byte[] dest,
short dest_off,
byte[] auth_key,
short auth_key_off,
short auth_key_blen,
short other_sector,
short other_block,
short other_len)
This method is used to read data from non-directly addressable memory after providing the correct key(password) to authenticate. |
boolean |
writeData(byte[] src,
short src_off,
short src_blen,
byte[] auth_key,
short auth_key_off,
short auth_key_blen,
short other_sector,
short other_block)
This method is used to write data into non-directly addressable memory after providing the correct key(password) to authenticate. |
Method Detail |
---|
boolean writeData(byte[] src, short src_off, short src_blen, byte[] auth_key, short auth_key_off, short auth_key_blen, short other_sector, short other_block) throws ExternalException
If the authentication fails or writes are disallowed at the specified
memory subsystem location(s), this method returns
false
.
src
- the source data byte arraysrc_off
- the byte offset into the src
array where data
beginssrc_blen
- the byte length of the data to be writtenauth_key
- the byte array containing the key(password)auth_key_off
- the byte offset into the auth_key
array where
the key data beginsauth_key_blen
- the length in bytes of the key in the auth_key
arrayother_sector
- the external memory subsystem sector numberother_block
- the external memory subsystem block number
true
if the write was successful,
false
otherwise
ExternalException
- with the following reason codes:
ExternalException.INVALID_PARAM
if any
of the input parameters are invalid.
ExternalException.INTERNAL_ERROR
if an
unrecoverable external memory access error occurred.
short readData(byte[] dest, short dest_off, byte[] auth_key, short auth_key_off, short auth_key_blen, short other_sector, short other_block, short other_len) throws ExternalException
If the authentication fails or reads are disallowed at the specified
memory subsystem location(s), this method returns
0
.
dest
- the destination data byte arraydest_off
- the byte offset into the dest array
where data
should beginauth_key
- the byte array containing the key(password)auth_key_off
- the byte offset into the auth_key
array where
the key data beginsauth_key_blen
- the length in bytes of the key in the auth_key
arrayother_sector
- the other memory subsystem sector numberother_block
- the other memory subsystem block numberother_len
- the number of bytes of memory to be read
dest
array. 0 if none.
ExternalException
- with the following reason codes:
ExternalException.INVALID_PARAM
if any
of the input parameters are invalid.
ExternalException.INTERNAL_ERROR
if an
unrecoverable external memory access error occurred.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |