Retrieves the whole text and closes the stream. @return token builder instance @throws IOException I/O exception
()
| 161 | * @throws IOException I/O exception |
| 162 | */ |
| 163 | public final TokenBuilder cache() throws IOException { |
| 164 | try { |
| 165 | final TokenBuilder tb = new TokenBuilder(Array.initialCapacity(length)); |
| 166 | for(int ch; (ch = read()) != -1;) tb.add(ch); |
| 167 | return tb; |
| 168 | } finally { |
| 169 | close(); |
| 170 | } |
| 171 | } |
| 172 | } |
no test coverage detected