Brendon,

        is the file c009 existing in the card? Check first with the GPKPilot if it 
does exists. And also, including the complete printStackTrace of the error would speed 
up resolution of your problem.

Cheers,

harley          

8/30/01 7:24:16 PM, Brendon Perero <[EMAIL PROTECTED]> wrote:

>Hi All,
>
>I'm trying to run the second demo from the Programmers guide and
>Cardfile.getLength() is throwing a NullPointerException.
>
>I using a Litronic 210 reader with PC/SC and Gemplus GPK8000 card.
>
>Here is a snippit of the code.  The last line is where the exception is
>being thrown.
>
>......
>CardRequest cr = new CardRequest(CardRequest.NEWCARD, null,
>FileAccessCardService.class);
>SmartCard sc = SmartCard.waitForCard(cr);
>
>FileAccessCardService facs = (FileAccessCardService)
>sc.getCardService(FileAccessCardService.class, true);
>
>CardFile root = new CardFile(facs);
>CardFile file = new CardFile(root, ":c009");
>
>String entry = args[0].replace(':', '\n');
>byte[] bytes = entry.getBytes();
>int length = bytes.length;
>
>byte[] data = new byte [file.getLength()];
>.........
>
>Any help or point in the right directions would be much appreciated.
>
>Thanks,
>Brendon
>
>
>
>
>---
>> 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.
>




_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



---
> 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