MCPcopy Create free account
hub / github.com/BaseXdb/basex / cache

Method cache

basex-core/src/main/java/org/basex/io/in/TextInput.java:163–171  ·  view source on GitHub ↗

Retrieves the whole text and closes the stream. @return token builder instance @throws IOException I/O exception

()

Source from the content-addressed store, hash-verified

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}

Callers 1

contentMethod · 0.95

Calls 4

initialCapacityMethod · 0.95
readMethod · 0.95
addMethod · 0.95
closeMethod · 0.65

Tested by

no test coverage detected