ByteList#ensure should make the buffer requested size, not * 1.5.
Charles Oliver Nutter
9 years ago
336 | 336 |
*/
|
337 | 337 |
public void ensure(int length) {
|
338 | 338 |
if (begin + length > bytes.length) {
|
339 | |
byte[] tmp = new byte[length + (length >>> 1)];
|
|
339 |
byte[] tmp = new byte[length];
|
340 | 340 |
System.arraycopy(bytes, begin, tmp, 0, realSize);
|
341 | 341 |
bytes = tmp;
|
342 | 342 |
begin = 0;
|