Class Patch
java.lang.Object
com.jsql.model.injection.strategy.blind.patch.Patch
Class representing one patch operation.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetDiffs()
int
int
int
int
void
setLength1
(int length1) int
setLength2
(int length2) void
setStart1
(int start1) void
setStart2
(int start2) toString()
Emmulate GNU diff's format.static String
Unescape selected chars for compatability with JavaScript's encodeURI.
-
Constructor Details
-
Patch
public Patch()Constructor. Initializes with an empty list of diffs.
-
-
Method Details
-
toString
Emmulate GNU diff's format. Header: @@ -382,8 +481,9 @@ Indicies are printed as 1-based, not 0-based. -
unescapeForEncodeUriCompatability
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
-
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)
-