protected boolean displayHeader(OutputStream os, String path, boolean deleted) throws IOException { if (deleted && !isDiffDeleted()) { os.write("Index: ".getBytes(getEncoding())); os.write(path.getBytes(getEncoding())); os.write(" (deleted)".getBytes(getEncoding())); os.write(getEOL()); os.write(HEADER_SEPARATOR.getBytes(getEncoding())); os.write(getEOL()); return true; } os.write("Index: ".getBytes(getEncoding())); os.write(path.getBytes(getEncoding())); os.write(getEOL()); os.write(HEADER_SEPARATOR.getBytes(getEncoding())); os.write(getEOL()); return false; }
protected boolean displayHeader(OutputStream os, String path, boolean deleted) throws IOException { if (deleted && !isDiffDeleted()) { os.write("Index: ".getBytes(getEncoding())); os.write(path.getBytes(getEncoding())); os.write(" (deleted)".getBytes(getEncoding())); os.write(getEOL()); os.write(HEADER_SEPARATOR.getBytes(getEncoding())); os.write(getEOL()); return true; } os.write("Index: ".getBytes(getEncoding())); os.write(path.getBytes(getEncoding())); os.write(getEOL()); os.write(HEADER_SEPARATOR.getBytes(getEncoding())); os.write(getEOL()); return false; }
protected boolean displayHeader(OutputStream os, String path, boolean deleted) throws IOException { if (deleted && !isDiffDeleted()) { os.write("Index: ".getBytes(getEncoding())); os.write(path.getBytes(getEncoding())); os.write(" (deleted)".getBytes(getEncoding())); os.write(getEOL()); os.write(HEADER_SEPARATOR); os.write(getEOL()); return true; } os.write("Index: ".getBytes(getEncoding())); os.write(path.getBytes(getEncoding())); os.write(getEOL()); os.write(HEADER_SEPARATOR); os.write(getEOL()); return false; }
public SvnNewDiffGenerator(ISvnDiffGenerator generator) { this.generator = generator; if (generator instanceof DefaultSVNDiffGenerator) { DefaultSVNDiffGenerator defaultGenerator = (DefaultSVNDiffGenerator) generator; this.diffAdded = defaultGenerator.isDiffAdded(); this.diffDeleted = defaultGenerator.isDiffDeleted(); this.diffCopied = defaultGenerator.isDiffCopied(); this.diffUnversioned = defaultGenerator.isDiffUnversioned(); } else { this.diffAdded = true; this.diffDeleted = true; this.diffCopied = false; this.diffUnversioned = false; } }
ByteArrayOutputStream bos = new ByteArrayOutputStream(); try { if (file2 == null && !isDiffDeleted()) { bos.write("Index: ".getBytes(getEncoding())); bos.write(path.getBytes(getEncoding()));