PackInputStream(DfsPackFile pack, long pos, DfsReader ctx) throws IOException { this.pack = pack; this.pos = pos; this.ctx = ctx; // Pin the first window, to ensure the pack is open and valid. // ctx.pin(pack, pos); }
DfsBlock quickCopy(DfsPackFile p, long pos, long cnt) throws IOException { pin(p, pos); if (block.contains(p.key, pos + (cnt - 1))) return block; return null; }
pin(file, position); int r = block.copy(position, dstbuf, dstoff, need); position += r;
void copyPackAsIs(PackOutputStream out, DfsReader ctx) throws IOException { // If the length hasn't been determined yet, pin to set it. if (length == -1) { ctx.pin(this, 0); ctx.unpin(); } if (cache.shouldCopyThroughCache(length)) copyPackThroughCache(out, ctx); else copyPackBypassCache(out, ctx); }
PackInputStream(DfsPackFile pack, long pos, DfsReader ctx) throws IOException { this.pack = pack; this.pos = pos; this.ctx = ctx; // Pin the first window, to ensure the pack is open and valid. // ctx.pin(pack, pos); }
PackInputStream(DfsPackFile pack, long pos, DfsReader ctx) throws IOException { this.pack = pack; this.pos = pos; this.ctx = ctx; // Pin the first window, to ensure the pack is open and valid. // ctx.pin(pack, pos); }
DfsBlock quickCopy(DfsPackFile p, long pos, long cnt) throws IOException { pin(p, pos); if (block.contains(p.key, pos + (cnt - 1))) return block; return null; }
DfsBlock quickCopy(DfsPackFile p, long pos, long cnt) throws IOException { pin(p, pos); if (block.contains(p.key, pos + (cnt - 1))) return block; return null; }
pin(file, position); int r = block.copy(position, dstbuf, dstoff, need); position += r;
pin(pack, position); int r = block.copy(position, dstbuf, dstoff, need); position += r;
void copyPackAsIs(PackOutputStream out, DfsReader ctx) throws IOException { // If the length hasn't been determined yet, pin to set it. if (length == -1) { ctx.pin(this, 0); ctx.unpin(); } if (cache.shouldCopyThroughCache(length)) copyPackThroughCache(out, ctx); else copyPackBypassCache(out, ctx); }
void copyPackAsIs(PackOutputStream out, DfsReader ctx) throws IOException { // If the length hasn't been determined yet, pin to set it. if (length == -1) { ctx.pin(this, 0); ctx.unpin(); } if (cache.shouldCopyThroughCache(length)) copyPackThroughCache(out, ctx); else copyPackBypassCache(out, ctx); }