Convert BasicCardString to Java String

[ Follow Ups ] [ BasicCard User Forum ]

Posted by njouda ( on October 14, 2013 at 12:33:04:


I'm a basic card beginner.I was learning the basic card language. and I create a small program with java using basic card java library. But I have a problem with converting Basic String to java String. I tried every thing but nothing worked !
=============Application output==========
Please insert a BasicCard To test program
Data From Card is:
There is no string !!!!

could you please could help me, I spent hours trying to solve it.

This is my java code:


String data;
System.out.println("Data From Card is:" + data);
public String CardData()throws CommsException, UnsupportedEncodingException
{BasicCardCommand cmd = new BasicCardCommand(0x88, 0x00);
BasicCardResponse rsp = doCommandAndResponse(cmd);
BasicCardString b1 = new BasicCardString ();
b1 = rsp.fetchBasicString();
String s;
s= b1.toString(STRING_ENCODING);
return s;

Follow Ups:

[ Follow Ups ] [ BasicCard User Forum ]