mirror of
https://github.com/ProjectSWGCore/Holocore.git
synced 2026-10-20 10:03:02 -04:00
Created a method in Packet for getting boolean arrays from a ByteBuffer
This commit is contained in:
@@ -260,7 +260,15 @@ public class Packet {
|
||||
ints[i] = bb.getInt();
|
||||
return ints;
|
||||
}
|
||||
|
||||
|
||||
public static boolean[] getBooleanArray(ByteBuffer bb) {
|
||||
bb.order(ByteOrder.LITTLE_ENDIAN);
|
||||
boolean[] booleans = new boolean[bb.getInt()];
|
||||
for(int i = 0; i < booleans.length; i++)
|
||||
booleans[i] = getBoolean(bb);
|
||||
return booleans;
|
||||
}
|
||||
|
||||
/**
|
||||
* Decodes the ByteBuffer stream into the passed List using the given listType instance for creating elements
|
||||
* for the list from the buffer.
|
||||
|
||||
Reference in New Issue
Block a user