(int position, int amount, boolean absolute)
| 274 | } |
| 275 | |
| 276 | protected void checkPut(int position, int amount, boolean absolute) { |
| 277 | if (readOnly) { |
| 278 | throw new ReadOnlyBufferException(); |
| 279 | } |
| 280 | |
| 281 | if (position < 0 || position+amount > limit) { |
| 282 | throw absolute |
| 283 | ? new IndexOutOfBoundsException() |
| 284 | : new BufferOverflowException(); |
| 285 | } |
| 286 | } |
| 287 | |
| 288 | protected void checkGet(int position, int amount, boolean absolute) { |
| 289 | if (amount > limit-position) { |