private boolean fmtBuf(byte[] nameBuf, int namePos, int nameLen, FileMode mode) { if (buf == null || buf.length < ptr + entrySize(mode, nameLen)) return false; mode.copyTo(buf, ptr); ptr += mode.copyToLength(); buf[ptr++] = ' '; System.arraycopy(nameBuf, namePos, buf, ptr, nameLen); ptr += nameLen; buf[ptr++] = 0; return true; }
/** * Format index line * * @param o * the stream the formatter will write line data to * @param ent * the DiffEntry to create the FileHeader for * @throws java.io.IOException * writing to the supplied stream failed. */ protected void formatIndexLine(OutputStream o, DiffEntry ent) throws IOException { o.write(encodeASCII("index " // //$NON-NLS-1$ + format(ent.getOldId()) // + ".." // //$NON-NLS-1$ + format(ent.getNewId()))); if (ent.getOldMode().equals(ent.getNewMode())) { o.write(' '); ent.getNewMode().copyTo(o); } o.write('\n'); }
private boolean fmtBuf(byte[] nameBuf, int namePos, int nameLen, FileMode mode) { if (buf == null || buf.length < ptr + entrySize(mode, nameLen)) return false; mode.copyTo(buf, ptr); ptr += mode.copyToLength(); buf[ptr++] = ' '; System.arraycopy(nameBuf, namePos, buf, ptr, nameLen); ptr += nameLen; buf[ptr++] = 0; return true; }
private void fmtOverflowBuffer(byte[] nameBuf, int namePos, int nameLen, FileMode mode) throws IOException { if (buf != null) { overflowBuffer = new TemporaryBuffer.Heap(Integer.MAX_VALUE); overflowBuffer.write(buf, 0, ptr); buf = null; } mode.copyTo(overflowBuffer); overflowBuffer.write((byte) ' '); overflowBuffer.write(nameBuf, namePos, nameLen); overflowBuffer.write((byte) 0); }
private boolean fmtBuf(byte[] nameBuf, int namePos, int nameLen, FileMode mode) { if (buf == null || buf.length < ptr + entrySize(mode, nameLen)) return false; mode.copyTo(buf, ptr); ptr += mode.copyToLength(); buf[ptr++] = ' '; System.arraycopy(nameBuf, namePos, buf, ptr, nameLen); ptr += nameLen; buf[ptr++] = 0; return true; }
/** * @param o * the stream the formatter will write line data to * @param ent * the DiffEntry to create the FileHeader for * @throws IOException * writing to the supplied stream failed. */ protected void formatIndexLine(OutputStream o, DiffEntry ent) throws IOException { o.write(encodeASCII("index " // //$NON-NLS-1$ + format(ent.getOldId()) // + ".." // //$NON-NLS-1$ + format(ent.getNewId()))); if (ent.getOldMode().equals(ent.getNewMode())) { o.write(' '); ent.getNewMode().copyTo(o); } o.write('\n'); }
/** * Format index line * * @param o * the stream the formatter will write line data to * @param ent * the DiffEntry to create the FileHeader for * @throws java.io.IOException * writing to the supplied stream failed. */ protected void formatIndexLine(OutputStream o, DiffEntry ent) throws IOException { o.write(encodeASCII("index " // //$NON-NLS-1$ + format(ent.getOldId()) // + ".." // //$NON-NLS-1$ + format(ent.getNewId()))); if (ent.getOldMode().equals(ent.getNewMode())) { o.write(' '); ent.getNewMode().copyTo(o); } o.write('\n'); }
private void fmtOverflowBuffer(byte[] nameBuf, int namePos, int nameLen, FileMode mode) throws IOException { if (buf != null) { overflowBuffer = new TemporaryBuffer.Heap(Integer.MAX_VALUE); overflowBuffer.write(buf, 0, ptr); buf = null; } mode.copyTo(overflowBuffer); overflowBuffer.write((byte) ' '); overflowBuffer.write(nameBuf, namePos, nameLen); overflowBuffer.write((byte) 0); }
private void fmtOverflowBuffer(byte[] nameBuf, int namePos, int nameLen, FileMode mode) throws IOException { if (buf != null) { overflowBuffer = new TemporaryBuffer.Heap(Integer.MAX_VALUE); overflowBuffer.write(buf, 0, ptr); buf = null; } mode.copyTo(overflowBuffer); overflowBuffer.write((byte) ' '); overflowBuffer.write(nameBuf, namePos, nameLen); overflowBuffer.write((byte) 0); }