Java Mine
|
public static byte[] getTwoBytes(long x) { byte[] b = new byte[2]; ByteBuffer bb = ByteBuffer.wrap(b); bb.putChar((char)x); byte[] bswap = { bb.array()[1], bb.array()[0] }; // Extensions.debug(x, 14); // Extensions.debug(bswap[0], 14); // Extensions.debug(bswap[1], 14); return bswap;
Copyright (c) 2022. All rights reserved.
|
What do you think about this topic? Send feedback!
|