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
public short bytesToShort(byte[] bytes) { return ByteBuffer.wrap(bytes).order(ByteOrder.LITTLE_ENDIAN).getShort(); } public byte[] shortToBytes(short value) { return ByteBuffer.allocate(2).order(ByteOrder.LITTLE_ENDIAN).putShort(value).array(); }