Someone knows what is the equivalent of this java code in swift 2.3
ByteBuffer tmpCounter = ByteBuffer.wrap(byteCounter);
System.out.println(tmpCounter.getLong());
Someone knows what is the equivalent of this java code in swift 2.3
ByteBuffer tmpCounter = ByteBuffer.wrap(byteCounter);
System.out.println(tmpCounter.getLong());
Well I already solved the equivalent to the byteByffer.wrap () would be in swift the following.
// Algoritmo equivalente a byteBuffer.wrap() de java
let array : [UInt8] = [0,0,0,0,0,0,62,62]; // tu array of bytes
var value : Int = 0;
for byte in array {
value = value << 8;
value = value | Int(byte);
}
print(value);