MCPcopy Create free account
hub / github.com/cschanck/single-file-java / readFully

Method readFully

src/main/java/org/sfj/ChiseledMap.java:273–281  ·  view source on GitHub ↗
(long addr, ByteBuffer tmp)

Source from the content-addressed store, hash-verified

271 }
272
273 private void readFully(long addr, ByteBuffer tmp) throws IOException {
274 do {
275 int many = fc.read(tmp, addr);
276 if (many <= 0) {
277 throw new IOException();
278 }
279 addr = addr + many;
280 } while (tmp.hasRemaining());
281 }
282
283 private synchronized void flushBuffer() throws IOException {
284 // flush defautl buffer, reset pending count

Callers 2

verifyHeaderMethod · 0.95
fetchMethod · 0.95

Calls 1

readMethod · 0.45

Tested by

no test coverage detected