Can anyone give me a util method that will give me first 16bit from a bytearray in Android/Java?
Code:
//Decode API response using Base64 decoder
byte[] decodedResult = Base64.decode(apiResponse, Base64.DEFAULT);
//get first 16 bit from decodedResult
byte[] first16Bit =
DUMMY Example in Flex language:
//Storing First 16 bits of databytearray to ivByteArray
var ivByteArray:ByteArray = new ByteArray();
ivByteArray.writeBytes(dataByteArray,0,16);
//Storing from 16 bits to length of databytearray to encByteArray
var encByteArray:ByteArray = new ByteArray();
encByteArray.writeBytes(dataByteArray,16);