private boolean done() { close(); return false; }
/** * Execute the generator in a blocking fashion until all data is ready. * * @return the complete result. Null if no file exists for the given path. * @throws java.io.IOException * the repository cannot be read. */ public BlameResult computeBlameResult() throws IOException { try { BlameResult r = BlameResult.create(this); if (r != null) r.computeAll(); return r; } finally { close(); } }
/** * Compute all pending information. * * @throws java.io.IOException * the repository cannot be read. */ public void computeAll() throws IOException { BlameGenerator gen = generator; if (gen == null) return; try { while (gen.next()) loadFrom(gen); } finally { gen.close(); generator = null; } }
/** * Construct a new BlameResult for a generator. * * @param gen * the generator the result will consume records from. * @return the new result object. null if the generator cannot find the path * it starts from. * @throws java.io.IOException * the repository cannot be read. */ public static BlameResult create(BlameGenerator gen) throws IOException { String path = gen.getResultPath(); RawText contents = gen.getResultContents(); if (contents == null) { gen.close(); return null; } return new BlameResult(gen, path, contents); }
/** * Compute the next available segment and return the first index. * <p> * Computes one segment and returns to the caller the first index that is * available. After return the caller can also inspect {@link #lastLength()} * to determine how many lines of the result were computed. * * @return index that is now available. -1 if no more are available. * @throws java.io.IOException * the repository cannot be read. */ public int computeNext() throws IOException { BlameGenerator gen = generator; if (gen == null) return -1; if (gen.next()) { loadFrom(gen); lastLength = gen.getRegionLength(); return gen.getResultStart(); } else { gen.close(); generator = null; return -1; } }
private boolean done() { close(); return false; }
private boolean done() { close(); return false; }
gen.close(); generator = null; return;
/** * Execute the generator in a blocking fashion until all data is ready. * * @return the complete result. Null if no file exists for the given path. * @throws IOException * the repository cannot be read. */ public BlameResult computeBlameResult() throws IOException { try { BlameResult r = BlameResult.create(this); if (r != null) r.computeAll(); return r; } finally { close(); } }
/** * Execute the generator in a blocking fashion until all data is ready. * * @return the complete result. Null if no file exists for the given path. * @throws java.io.IOException * the repository cannot be read. */ public BlameResult computeBlameResult() throws IOException { try { BlameResult r = BlameResult.create(this); if (r != null) r.computeAll(); return r; } finally { close(); } }
/** * Compute all pending information. * * @throws IOException * the repository cannot be read. */ public void computeAll() throws IOException { BlameGenerator gen = generator; if (gen == null) return; try { while (gen.next()) loadFrom(gen); } finally { gen.close(); generator = null; } }
/** * Compute all pending information. * * @throws java.io.IOException * the repository cannot be read. */ public void computeAll() throws IOException { BlameGenerator gen = generator; if (gen == null) return; try { while (gen.next()) loadFrom(gen); } finally { gen.close(); generator = null; } }
/** * Construct a new BlameResult for a generator. * * @param gen * the generator the result will consume records from. * @return the new result object. null if the generator cannot find the path * it starts from. * @throws IOException * the repository cannot be read. */ public static BlameResult create(BlameGenerator gen) throws IOException { String path = gen.getResultPath(); RawText contents = gen.getResultContents(); if (contents == null) { gen.close(); return null; } return new BlameResult(gen, path, contents); }
/** * Construct a new BlameResult for a generator. * * @param gen * the generator the result will consume records from. * @return the new result object. null if the generator cannot find the path * it starts from. * @throws java.io.IOException * the repository cannot be read. */ public static BlameResult create(BlameGenerator gen) throws IOException { String path = gen.getResultPath(); RawText contents = gen.getResultContents(); if (contents == null) { gen.close(); return null; } return new BlameResult(gen, path, contents); }
/** * Compute the next available segment and return the first index. * <p> * Computes one segment and returns to the caller the first index that is * available. After return the caller can also inspect {@link #lastLength()} * to determine how many lines of the result were computed. * * @return index that is now available. -1 if no more are available. * @throws java.io.IOException * the repository cannot be read. */ public int computeNext() throws IOException { BlameGenerator gen = generator; if (gen == null) return -1; if (gen.next()) { loadFrom(gen); lastLength = gen.getRegionLength(); return gen.getResultStart(); } else { gen.close(); generator = null; return -1; } }
/** * Compute the next available segment and return the first index. * <p> * Computes one segment and returns to the caller the first index that is * available. After return the caller can also inspect {@link #lastLength()} * to determine how many lines of the result were computed. * * @return index that is now available. -1 if no more are available. * @throws IOException * the repository cannot be read. */ public int computeNext() throws IOException { BlameGenerator gen = generator; if (gen == null) return -1; if (gen.next()) { loadFrom(gen); lastLength = gen.getRegionLength(); return gen.getResultStart(); } else { gen.close(); generator = null; return -1; } }
gen.close(); generator = null; return;
gen.close(); generator = null; return;