JavacardOS will not accept order any more, please contact our partner Feitian online Store:
https://ftsafe.en.alibaba.com/index.html
https://ftsafe.en.alibaba.com/index.html
how to get the available space of chip?
how to get the available space of chip?
how to get the available space of chip?
Re: how to get the available space of chip?
In JavaCardAPI, the JCSystem.getAvailableMemory() API may help you get your want.
Re: how to get the available space of chip?
but why the space size obtained by API is smaller than the actual space size?
-
- Posts: 39
- Joined: Wed Aug 31, 2016 9:55 pm
- Points :372
- Contact:
Re: how to get the available space of chip?
do it like this:
Code: Select all
while (true) {
try {
bbb = JCSystem.makeTransientByteArray(memsize, JCSystem.MEMORY_TYPE_TRANSIENT_DESELECT);
allmemsize += memsize;
if(memsize != 0x7fff)
break;
} catch (CardRuntimeException ex) {
memsize -= 1;
continue;
}
}
Re: how to get the available space of chip?
In 《JavaCardAPI》, one item in Notes of getAvailableMemory() is "If the number of available bytes is greater than 32767, then this method returns 32767."
So, if the return value is 32767, you should call getAvailableMeory() again to look up whether the card has more available memory.
So, if the return value is 32767, you should call getAvailableMeory() again to look up whether the card has more available memory.
Who is online
Users browsing this forum: Google [Bot] and 50 guests