(int n)
| 53 | } |
| 54 | |
| 55 | private void |
| 56 | need(int n) { |
| 57 | if (array.length - pos >= n) { |
| 58 | return; |
| 59 | } |
| 60 | int newsize = array.length * 2; |
| 61 | if (newsize < pos + n) { |
| 62 | newsize = pos + n; |
| 63 | } |
| 64 | byte [] newarray = new byte[newsize]; |
| 65 | System.arraycopy(array, 0, newarray, 0, pos); |
| 66 | array = newarray; |
| 67 | } |
| 68 | |
| 69 | /** |
| 70 | * Resets the current position of the output stream to the specified index. |
no outgoing calls
no test coverage detected