I have a javascript snippet which will take 4 byte and convert that in to int value.
var bufView = new Uint8Array([0xe4, 0x0e, 0x00, 0x00]);
var a = new Int32Array(bufView.buffer.slice(0,4))[0]
console.log(a);
Output of the above code is 3812
I want to do the same operation in Java as well where I have
byte[] bytes = {(byte) 0xe4, 0x0e, 0x00, 0x00};
I have searched whole internet but I could not see any results related to this. How can we achieve this?