Validates the size of an input BitSet containing the raw packed chunk data. Sizes that exceed CachedChunk#size are considered invalid, and thus, an exception will be thrown. @param data The raw data @throws IllegalArgumentException if the bitset size exceeds the maximum size
(BitSet data)
| 295 | * @throws IllegalArgumentException if the bitset size exceeds the maximum size |
| 296 | */ |
| 297 | private void validateSize(BitSet data) { |
| 298 | if (data.size() > size) { |
| 299 | throw new IllegalArgumentException("BitSet of invalid length provided"); |
| 300 | } |
| 301 | } |
| 302 | } |