in my program, i have capkTable
Java
class which is a String
. In another class, i want to get a data, so i can use appState.capkTable.setCapki(data[i+3])
.
knowing fully well that (data[i+3])
is a byte.
How can i convert it to String
?
what i did is this :
byte[] testing = new byte [(data[i+3])];
int tagDataLength = 0;
appState.capkTable.setCapki(StringUtil.toString(AppUtil.removeTailF(ByteUtil.bcdToAscii(testing, 0, tagDataLength))));
i don't know if i am doing it the right way..cos, instead of getting a value, it's returning java.lang.NullPointerException