public final class Memory extends Object
Modifier and Type | Field and Description |
---|---|
static byte |
MEMORY_TYPE_EXTENDED_STORE
Extended Memory Store type constant.
|
static byte |
MEMORY_TYPE_MIFARE
MIFARETM memory type constant.
|
Modifier and Type | Method and Description |
---|---|
static MemoryAccess |
getMemoryAccessInstance(byte memoryType,
short[] memorySize,
short memorySizeOffset)
Creates a
MemoryAccess object instance for the selected
memory subsystem. |
public static final byte MEMORY_TYPE_MIFARE
MemoryAccess
instance of this type is requested, the
memorySize
and memorySizeOffset
parameters
are ignored.
To use the MemoryAccess
instance the following parameters
are applicable :
Note:
public static final byte MEMORY_TYPE_EXTENDED_STORE
MemoryAccess
instance of this type is requested, the memorySize
parameter contains the 32 bit number representing the size in bytes of
the memory access required and must be a positive number less than or
equal to 2,147,483,647 (2^31 - 1)
.
To use the MemoryAccess
instance the following parameters
are applicable.
Note.
getMemoryAccessInstance
method is called
with this memory type parameter, a new memory access object to access a distinct memory chunk
is returned. A previously obtained memory access object cannot be used to access the
memory chunk obtained via this new memory access object. The new memory access object
cannot be used to access the memory chuck accessible via any previously allocated
memory access object.
public static final MemoryAccess getMemoryAccessInstance(byte memoryType, short[] memorySize, short memorySizeOffset) throws ExternalException
MemoryAccess
object instance for the selected
memory subsystem.memoryType
- the desired external memory subsystem. Valid codes listed in
MEMORY_TYPE_*
constants above, for example
MEMORY_TYPE_MIFARE
.memorySize
- the array containing the desired size in bytes, if applicable,
in the external memory subsystem. Check the descriptions of
the MEMORY_TYPE_* constants above for more details. The 32 bit
number representing the memory size in bytes is formed by
concatenating the two short values at offset
memorySizeOffset
(most significant 16 bits) and
memorySizeOffset+1
(least significant 16 bits)
in this arraymemorySizeOffset
- the offset within the memorySize
array where
the 32 bit memory size number in bytes is specifiedMemoryAccess
object instance of the requested
memory subsystemExternalException
- with the following reason codes:
ExternalException.NO_SUCH_SUBSYSTEM
if
the requested memory subsystem is not available.
ExternalException.INVALID_PARAM
if the
memorySize
parameter is invalid.
Copyright © 1998, 2015, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms