I get a Q about apdu buffer

hi ,i am confuesed by a question about apdu buffer

it is maybe simple for guys here ,i really apriciate any one who relies

i just want to know is there is somegthing bigger than the apdu buffer

what i can do? in the java card api ,it says that"read in portions",so

how to do it?one time there is someting bigger incoming ,still i will

have to call getBuffer() to deal with it,how can i receive the message

in portions? please show me some example

thanks for any help

[517 byte] By [SkevinLearna] at [2007-11-27 9:08:04]
# 1
It's quite simple. Create a buffer with the same size as the data you want to store. Then send the data with offset set in P1 and P2 and store the data at the given offset (if you send with maximum data length, first offset will be 0x0000, next one 0x00ff and so on).
Lillesanda at 2007-7-12 21:45:36 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 2
thanks a lot man!but if i do not know the size of the incoming message ?you mean i should know the size of incoming message all the time?and i think the buffer is limited so it will overflow right?thanks again, man
SkevinLearna at 2007-7-12 21:45:36 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 3
don't you know the size of your data with the LC ?
Joseph.Smitha at 2007-7-12 21:45:36 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 4

If you don't know the total length of the incoming data in advance, that is certainly a problem. The easiest thing is to let the application using the smartcard set the length in advance (by explicit messaging or use of parameters in the first message), which you then use to create an array of the length you need.

I can think of a way to do it on the fly, but it would be horrible both programming and resource management (just create some relatively large number of arrays stored in another array, and then instantiate them and store the partial data in separate arrays as the come in. I don't recommend this if there is any way around it, and I don't think I would ever do it myself, but it should certainly be possible.).

Lillesanda at 2007-7-12 21:45:37 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 5
ok ,what ever ,thanks a lot to you lillesand !if i have anyother Q about java card ,i will post here againThanks
SkevinLearna at 2007-7-12 21:45:37 > top of Java-index,Java Mobility Forums,Consumer and Commerce...