public class EncodingPatternPreservation extends Object
Constructor and Description |
---|
EncodingPatternPreservation(Pattern pattern)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
captureAndReplaceMatches(String input)
Replaces each matching instance of this instance's Pattern with an
identifiable replacement marker.
|
void |
reset()
Clears any stored replacement values out of the instance.
|
String |
restoreOriginalContent(String input)
Replaces each instance of the
replacementMarker with the original
content, as captured by captureAndReplaceMatches(String) |
void |
setReplacementMarker(String marker)
Allows the marker used as a replacement to be altered.
|
public EncodingPatternPreservation(Pattern pattern)
pattern
- Pattern identifying content being replaced.public String captureAndReplaceMatches(String input)
restoreOriginalContent(String)
to re-insert the original data.input
- String to adjustpublic String restoreOriginalContent(String input)
replacementMarker
with the original
content, as captured by captureAndReplaceMatches(String)
input
- String to restore.public void setReplacementMarker(String marker)
marker
- String replacment to use for regex matches.public void reset()
Copyright © 2022 The Open Web Application Security Project (OWASP). All rights reserved.