List of utility methods to do ByteBuffer to Int Array
int[] | deserializeIntArray(ByteBuffer buffer) deserialize Int Array int size = buffer.getInt(); int[] nums = new int[size]; for (int i = 0; i < size; i++) { nums[i] = buffer.getInt(); return nums; |
int[] | deserializeIntArray(ByteBuffer buffer) deserialize Int Array int size = buffer.getInt(); int[] nums = new int[size]; for (int i = 0; i < size; i++) { nums[i] = buffer.getInt(); return nums; |
int[] | getInt(ByteBuffer b, int n) get Int int i[] = new int[n]; for (int k = 0; k < i.length; k++) { i[k] = b.getInt(); return i; |
long | getInt(ByteBuffer bb) Get an unsigned int from the byte buffer. return (bb.getInt() & 0xffffffffL);
|
int | getInt(ByteBuffer bb, int bi) get Int return makeInt(bb.get(bi + 3), bb.get(bi + 2), bb.get(bi + 1), bb.get(bi));
|
int | getInt(ByteBuffer buffer, ByteOrder order) get Int int offset = buffer.position(); int rtn = getInt(buffer, offset, order); buffer.position(offset + 4); return rtn; |
long | getInt(ByteBuffer byteBuffer) get Int return ((long) byteBuffer.getInt() & INT_PADDING); |
int | getInt(ByteBuffer intCalculator, byte[] bytes) Calculates the corresponding integer given 4 sequential bytes. intCalculator.clear();
intCalculator.put(bytes);
intCalculator.position(0);
return intCalculator.getInt();
|
int | getInt8(ByteBuffer input) get Int return input.get();
|
int[] | getIntArray(ByteBuffer buffer, int size) get Int Array int[] result = new int[size]; for (int i = 0; i < size; i++) { result[i] = buffer.getInt(); return result; |