public static QSequenceLineRAByteData create(InputStream is) throws IOException { final ByteArrayOutputStream os = new ByteArrayOutputStream(); for (; ;) { final int b = is.read(); if (b == -1) { break; } os.write(b); } return new QSequenceLineRAByteData(os.toByteArray()); }
public static QSequenceLineRAByteData create(InputStream is) throws IOException { final ByteArrayOutputStream os = new ByteArrayOutputStream(); for (; ;) { final int b = is.read(); if (b == -1) { break; } os.write(b); } return new QSequenceLineRAByteData(os.toByteArray()); }
public static QSequenceLineRAByteData create(InputStream is) throws IOException { final ByteArrayOutputStream os = new ByteArrayOutputStream(); for (; ;) { final int b = is.read(); if (b == -1) { break; } os.write(b); } return new QSequenceLineRAByteData(os.toByteArray()); }
public static QSequenceLineRAByteData create(InputStream is) throws IOException { final ByteArrayOutputStream os = new ByteArrayOutputStream(); for (; ;) { final int b = is.read(); if (b == -1) { break; } os.write(b); } return new QSequenceLineRAByteData(os.toByteArray()); }
public void generateTextDiff(InputStream left, InputStream right, String encoding, Writer output) throws IOException { final QSequenceLineResult result; try { result = QSequenceLineMedia.createBlocks(QSequenceLineRAByteData.create(left), QSequenceLineRAByteData.create(right), getSimplifier()); } catch (QSequenceException ex) { throw new IOException(ex.getMessage()); } try { final List combinedBlocks = combineBlocks(result.getBlocks(), getGutter()); boolean headerWritten = false; for (Iterator it = combinedBlocks.iterator(); it.hasNext();) { List segment = (List)it.next(); if (segment.isEmpty()) { continue; } if (!headerWritten && header != null) { headerWritten = true; output.write(header); } QSequenceDifferenceBlock[] segmentBlocks = (QSequenceDifferenceBlock[])segment.toArray(new QSequenceDifferenceBlock[segment.size()]); processBlock(segmentBlocks, result.getLeftCache(), result.getRightCache(), encoding, output); } } finally { result.close(); } }
public void generateTextDiff(RandomAccessFile left, RandomAccessFile right, String encoding, Writer output) throws IOException { QSequenceLineRAData leftData = null, rightData = null; if (left == null) { leftData = new QSequenceLineRAByteData(new byte[0]); } else { leftData = new QSequenceLineRAFileData(left); } if (right == null) { rightData = new QSequenceLineRAByteData(new byte[0]); } else { rightData = new QSequenceLineRAFileData(right); } generateTextDiff(leftData, rightData, encoding, output); }
public void generateTextDiff(RandomAccessFile left, RandomAccessFile right, String encoding, Writer output) throws IOException { QSequenceLineRAData leftData = null, rightData = null; if (left == null) { leftData = new QSequenceLineRAByteData(new byte[0]); } else { leftData = new QSequenceLineRAFileData(left); } if (right == null) { rightData = new QSequenceLineRAByteData(new byte[0]); } else { rightData = new QSequenceLineRAFileData(right); } generateTextDiff(leftData, rightData, encoding, output); }
public void generateTextDiff(RandomAccessFile left, RandomAccessFile right, String encoding, Writer output) throws IOException { QSequenceLineRAData leftData = null, rightData = null; if (left == null) { leftData = new QSequenceLineRAByteData(new byte[0]); } else { leftData = new QSequenceLineRAFileData(left); } if (right == null) { rightData = new QSequenceLineRAByteData(new byte[0]); } else { rightData = new QSequenceLineRAFileData(right); } generateTextDiff(leftData, rightData, encoding, output); }
public void generateTextDiff(RandomAccessFile left, RandomAccessFile right, OutputStream output) throws IOException { QSequenceLineRAData leftData = null, rightData = null; if (left == null) { leftData = new QSequenceLineRAByteData(new byte[0]); } else { leftData = new QSequenceLineRAFileData(left); } if (right == null) { rightData = new QSequenceLineRAByteData(new byte[0]); } else { rightData = new QSequenceLineRAFileData(right); } generateTextDiff(leftData, rightData, output); }
new QSequenceLineRAByteData(originalBytes), new QSequenceLineRAByteData(mineBytes), new QSequenceLineRAByteData(incomingBytes), diffOptions, result, SVNDiffConflictChoiceStyle.CHOOSE_MODIFIED_LATEST); result.flush();
result = SVNFileUtil.openFileForWriting(mergedFile); QSequenceLineRAData baseData = new QSequenceLineRAByteData(SVNPropertyValue.getPropertyAsBytes(theValue)); QSequenceLineRAData localData = new QSequenceLineRAByteData(SVNPropertyValue.getPropertyAsBytes(workingValue)); QSequenceLineRAData latestData = new QSequenceLineRAByteData(SVNPropertyValue.getPropertyAsBytes(newValue)); merger.merge(baseData, localData, latestData, null, result); } catch (IOException e) {
result = SVNFileUtil.openFileForWriting(mergedFile); QSequenceLineRAData baseData = new QSequenceLineRAByteData(SVNPropertyValue.getPropertyAsBytes(theValue)); QSequenceLineRAData localData = new QSequenceLineRAByteData(SVNPropertyValue.getPropertyAsBytes(workingValue)); QSequenceLineRAData latestData = new QSequenceLineRAByteData(SVNPropertyValue.getPropertyAsBytes(newValue)); merger.merge(baseData, localData, latestData, null, result, null); } catch (IOException e) {
result = SVNFileUtil.openFileForWriting(mergedFile); QSequenceLineRAData baseData = new QSequenceLineRAByteData(SVNPropertyValue.getPropertyAsBytes(theValue)); QSequenceLineRAData localData = new QSequenceLineRAByteData(SVNPropertyValue.getPropertyAsBytes(workingValue)); QSequenceLineRAData latestData = new QSequenceLineRAByteData(SVNPropertyValue.getPropertyAsBytes(newValue)); merger.merge(baseData, localData, latestData, null, result, null); } catch (IOException e) {
cdesc.setMergedFile(SVNFileUtil.createUniqueFile(SVNFileUtil.getFileDir(localAbspath), SVNFileUtil.getFileName(localAbspath), ".tmp", false)); result = SVNFileUtil.openFileForWriting(cdesc.getMergedFile()); QSequenceLineRAData baseData = new QSequenceLineRAByteData(SVNPropertyValue.getPropertyAsBytes(theVal)); QSequenceLineRAData localData = new QSequenceLineRAByteData(SVNPropertyValue.getPropertyAsBytes(workingVal)); QSequenceLineRAData latestData = new QSequenceLineRAByteData(SVNPropertyValue.getPropertyAsBytes(newVal)); merger.merge(baseData, localData, latestData, null, result, null); } catch (IOException e) {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); try { merger.merge(new QSequenceLineRAByteData(SVNPropertyValue.getPropertyAsBytes(conflictBaseVal)), new QSequenceLineRAByteData(SVNPropertyValue.getPropertyAsBytes(workingVal)), new QSequenceLineRAByteData(SVNPropertyValue.getPropertyAsBytes(incomingNewVal)), svnDiffOptions, byteArrayOutputStream, SVNDiffConflictChoiceStyle.CHOOSE_MODIFIED_LATEST); File tempDir = getDb().getWCRootTempDir(localAbsPath);