(int i)
| 85 | } |
| 86 | |
| 87 | private void expand(int i) { |
| 88 | /* Can the buffer handle @i more bytes, if not expand it */ |
| 89 | if (count + i <= buf.length) { |
| 90 | return; |
| 91 | } |
| 92 | |
| 93 | byte[] newbuf = new byte[(count + i) * 2]; |
| 94 | System.arraycopy(buf, 0, newbuf, 0, count); |
| 95 | buf = newbuf; |
| 96 | } |
| 97 | |
| 98 | /** |
| 99 | * Resets this stream to the beginning of the underlying byte array. All |