private byte[] buffer(DeltaWindowEntry ent) throws MissingObjectException, IncorrectObjectTypeException, IOException, LargeObjectException { byte[] buf = ent.buffer; if (buf == null) { checkLoadable(ent, ent.size()); buf = PackWriter.buffer(config, reader, ent.object); if (maxMemory != 0) loaded += buf.length; ent.buffer = buf; } return buf; }
private DeltaIndex index(DeltaWindowEntry ent) throws MissingObjectException, IncorrectObjectTypeException, IOException, LargeObjectException { DeltaIndex idx = ent.index; if (idx == null) { checkLoadable(ent, estimateIndexSize(ent)); try { idx = new DeltaIndex(buffer(ent)); } catch (OutOfMemoryError noMemory) { LargeObjectException.OutOfMemory e; e = new LargeObjectException.OutOfMemory(noMemory); e.setObjectId(ent.object); throw e; } if (maxMemory != 0) loaded += idx.getIndexSize() - idx.getSourceSize(); ent.index = idx; } return idx; }
private byte[] buffer(DeltaWindowEntry ent) throws MissingObjectException, IncorrectObjectTypeException, IOException, LargeObjectException { byte[] buf = ent.buffer; if (buf == null) { checkLoadable(ent, ent.size()); buf = PackWriter.buffer(config, reader, ent.object); if (maxMemory != 0) loaded += buf.length; ent.buffer = buf; } return buf; }
private byte[] buffer(DeltaWindowEntry ent) throws MissingObjectException, IncorrectObjectTypeException, IOException, LargeObjectException { byte[] buf = ent.buffer; if (buf == null) { checkLoadable(ent, ent.size()); buf = PackWriter.buffer(config, reader, ent.object); if (maxMemory != 0) loaded += buf.length; ent.buffer = buf; } return buf; }
private DeltaIndex index(DeltaWindowEntry ent) throws MissingObjectException, IncorrectObjectTypeException, IOException, LargeObjectException { DeltaIndex idx = ent.index; if (idx == null) { checkLoadable(ent, estimateIndexSize(ent)); try { idx = new DeltaIndex(buffer(ent)); } catch (OutOfMemoryError noMemory) { LargeObjectException.OutOfMemory e; e = new LargeObjectException.OutOfMemory(noMemory); e.setObjectId(ent.object); throw e; } if (maxMemory != 0) loaded += idx.getIndexSize() - idx.getSourceSize(); ent.index = idx; } return idx; }
private DeltaIndex index(DeltaWindowEntry ent) throws MissingObjectException, IncorrectObjectTypeException, IOException, LargeObjectException { DeltaIndex idx = ent.index; if (idx == null) { checkLoadable(ent, estimateIndexSize(ent)); try { idx = new DeltaIndex(buffer(ent)); } catch (OutOfMemoryError noMemory) { LargeObjectException.OutOfMemory e; e = new LargeObjectException.OutOfMemory(noMemory); e.setObjectId(ent.object); throw e; } if (maxMemory != 0) loaded += idx.getIndexSize() - idx.getSourceSize(); ent.index = idx; } return idx; }