I have tried this short2byte and byte2short conversion, works fine but time consuming.
I am converting byte to short as shown below
ByteBuffer.wrap(bData).order(ByteOrder.LITTLE_ENDIAN).asShortBuffer().get(sData);
In same fashion I want to convert back short to byte.
I have searched and seen many examples but did not get it as I want.
I think I got the way.
conversion byte to short using ByteBuffer
conversion short to byte using ByteBuffer