How can i change this to String in java
<p>in my program, i have <code>capkTable</code> <code>Java</code> class which is a <code>String</code>. In another class, i want to get a data, so i can use <code>appState.capkTable.setCapki(data[i+3])</code>.
knowing fully well that <code>(data[i+3])</code> is a byte.</p>

<p>How can i convert it to <code>String</code>?</p>

<p>what i did is this :</p>

<pre><code>byte[] testing = new byte [(data[i+3])];
int tagDataLength = 0;
appState.capkTable.setCapki(StringUtil.toString(AppUtil.removeTailF(ByteUtil.bcdToAscii(testing,  0, tagDataLength))));
</code></pre>

<p>i don't know if i am doing it the right way..cos, instead of getting a value, it's returning <code>java.lang.NullPointerException</code></p>