SourceJammer 1.2.0.1 May 20, 2002
Copyright (c) 2001, 2002 Robert MacGrogan

org.sourcejammer.server.make
Class BuildDelta

java.lang.Object
  |
  +--org.sourcejammer.server.make.BuildDelta

public class BuildDelta
extends java.lang.Object


Constructor Summary
BuildDelta()
           
 
Method Summary
 BinaryDelta buildBinaryDelta(byte[] byOld, byte[] byNew)
          Builds a delta file (BinaryDelta) representing the difference between the two byte arrays such that byNew can be reconstructed using just the BinaryDelta constructed here and byOld.
 TextDiff buildTextDelta(byte[] byOld, byte[] byNew)
           
 TextDiff buildTextDelta(byte[] byOld, TextLineReader readerNew)
           
 TextDiff buildTextDelta(TextLineReader readerOld, TextLineReader readerNew)
           
 boolean getDebug()
           
 void setDebug(boolean b)
          If set to true, buildBinaryDelta() and buildTextDelta() output messages to default output.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuildDelta

public BuildDelta()
Method Detail

setDebug

public void setDebug(boolean b)
If set to true, buildBinaryDelta() and buildTextDelta() output messages to default output.

getDebug

public boolean getDebug()

buildBinaryDelta

public BinaryDelta buildBinaryDelta(byte[] byOld,
                                    byte[] byNew)
                             throws InvalidSourceException,
                                    EndOfSourceException
Builds a delta file (BinaryDelta) representing the difference between the two byte arrays such that byNew can be reconstructed using just the BinaryDelta constructed here and byOld.
Parameters:
byOld - -- an array of all the bytes in the "old" file version.
byNew - -- an array of all the bytes in the new file version.
Returns:
a BinaryDelta object, that encapsulates the differences between the two versions.
Throws:
InvalidSourceException - -- if there is a problem with one of the two source byte arrays.
EndOfSourceException - -- if the end of one of the source files is hit unexpectedly. Actually, I don't think this should ever be thrown.

buildTextDelta

public TextDiff buildTextDelta(byte[] byOld,
                               byte[] byNew)
                        throws InvalidSourceException,
                               EndOfSourceException,
                               java.io.IOException

buildTextDelta

public TextDiff buildTextDelta(byte[] byOld,
                               TextLineReader readerNew)
                        throws InvalidSourceException,
                               EndOfSourceException,
                               java.io.IOException

buildTextDelta

public TextDiff buildTextDelta(TextLineReader readerOld,
                               TextLineReader readerNew)
                        throws InvalidSourceException,
                               EndOfSourceException,
                               java.io.IOException

SourceJammer 1.2.0.1 May 20, 2002
Copyright (c) 2001, 2002 Robert MacGrogan