How to get address of a memory area
Hi, I want to pass as argument, the address of a byte array. Something like:static byte[] MyBuffer;NewAddr = adressof(MyBuffer)NewAddr[1] = (same as MyBuffer[1])Thanks... :-)
[209 byte] By [
davendaa] at [2007-11-27 8:43:16]

# 1
As far as I know, Java (and Java Card) does not allow direct addressing of memory. However, the objects you pass around are simply references, so simply doing
byte[] NewAddr = MyBuffer;
should do the trick.
I dunno if this is sufficient for your needs, but I think it's the only way.
# 2
Review the JCRE/JCVM specification. No, you can't access card memory. That would defeat 1) The purpose of JC layer 2) card securityRemeber JC is a small abstract of Java. Hence, if it can't be done in Java, it can't be done in JC !