java.lang.Object
com.jsql.model.injection.strategy.blind.patch.Patch

public class Patch extends Object
Class representing one patch operation.
  • Constructor Details

    • Patch

      public Patch()
      Constructor. Initializes with an empty list of diffs.
  • Method Details

    • toString

      public String toString()
      Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based.
      Overrides:
      toString in class Object
      Returns:
      The GNU diff string.
    • unescapeForEncodeUriCompatability

      public static String unescapeForEncodeUriCompatability(String str)
      Unescape selected chars for compatability with JavaScript's encodeURI. In speed critical applications this could be dropped since the receiving application will certainly decode these fine. Note that this function is case-sensitive. Thus "%3f" would not be unescaped. But this is ok because it is only called with the output of URLEncoder.encode which returns uppercase hex. Example: "%3F" -> "?", "%24" -> "$", etc.
      Parameters:
      str - The string to escape.
      Returns:
      The escaped string.
    • getDiffs

      public LinkedList<Diff> getDiffs()
    • getStart1

      public int getStart1()
    • setStart1

      public void setStart1(int start1)
    • getStart2

      public int getStart2()
    • setStart2

      public void setStart2(int start2)
    • getLength1

      public int getLength1()
    • setLength1

      public void setLength1(int length1)
    • getLength2

      public int getLength2()
    • setLength2

      public int setLength2(int length2)