I\'m having some issues taking audio data stored in a byte array, converting it to a big-endian short array, encoding it, then changing it back into a byte array. Here is wh
How about some ByteBuffers?
byte[] payload = new byte[]{0x7F,0x1B,0x10,0x11}; ByteBuffer bb = ByteBuffer.wrap(payload).order(ByteOrder.BIG_ENDIAN); ShortBuffer sb = bb.asShortBuffer(); while(sb.hasRemaining()){ System.out.println(sb.get()); }