I think there is some problem. I guess the word size(4 bytes) is playing some 
mischief. I will try to figure out the culprit.

Workaround:
Instead of you giving something like "byte[] readData = fss.read(ef_0201, 0, 1);", 
please give "byte[] readData = fss.read(ef_0201, 0, 4);". That is read atleast 4 bytes 
in one operation and you will not face this problem. 

----------
We all know how stupid the average person is. Now realize that, by
definition, fifty percent of the population is dumber than that.
- Ivan Stang


>-----Original Message-----
>From: Haripriya Kanduri [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, August 10, 2000 4:47 PM
>To: card
>Cc: Neeraja Murthy
>Subject: [OCF] Problem Reading from the card
>
>
>Hi
>
>I hav written an application to read and write to the smartcard with
>Java plugin1.2, GPK8000card and GCR410. I am making use of the java
>opencard API to read and write to the card.
>When i am reading from the card if i read the whole contents 
>of the file
>from the smartcard(which requires to know the file length in advance),
>it works well and gives me good results. When I am reading it byte by
>byte i.e when i read one byte at a time, first byte it gets 
>properly and
>then on it gives all wrong data.
>
>Has anyone faced this problem???i.e has anyone tried reading byte by
>byte from card using java opencard API????if u hav a soluion Pl let me
>know...
>
>Thanks and Regards
>Haripriya
>
>
>
>---
>> Visit the OpenCard web site at http://www.opencard.org/ for more
>> information on OpenCard---binaries, source code, documents.
>> This list is being archived at 
http://www.opencard.org/archive/opencard/

! To unsubscribe from the [EMAIL PROTECTED] mailing list send an email
! to
!                           [EMAIL PROTECTED]
! containing the word
!                           unsubscribe 
! in the body.




---
> Visit the OpenCard web site at http://www.opencard.org/ for more
> information on OpenCard---binaries, source code, documents.
> This list is being archived at http://www.opencard.org/archive/opencard/

! To unsubscribe from the [EMAIL PROTECTED] mailing list send an email
! to
!                           [EMAIL PROTECTED]
! containing the word
!                           unsubscribe 
! in the body.

Reply via email to