public final class URIResultParser extends ResultParser
Modifier and Type | Field and Description |
---|---|
private static java.util.regex.Pattern |
ALLOWED_URI_CHARS_PATTERN |
private static java.util.regex.Pattern |
URL_WITH_PROTOCOL_PATTERN |
private static java.util.regex.Pattern |
URL_WITHOUT_PROTOCOL_PATTERN |
private static java.util.regex.Pattern |
USER_IN_HOST |
EMPTY_STR_ARRAY
Constructor and Description |
---|
URIResultParser() |
Modifier and Type | Method and Description |
---|---|
(package private) static boolean |
isBasicallyValidURI(java.lang.String uri) |
(package private) static boolean |
isPossiblyMaliciousURI(java.lang.String uri) |
URIParsedResult |
parse(Result result)
Attempts to parse the raw
Result 's contents as a particular type
of information (email, URL, etc.) and return a ParsedResult encapsulating
the result of parsing. |
getMassagedText, isStringOfDigits, isSubstringOfDigits, matchPrefixedField, matchSinglePrefixedField, maybeAppend, maybeAppend, maybeWrap, parseHexDigit, parseNameValuePairs, parseResult, unescapeBackslash, urlDecode
private static final java.util.regex.Pattern ALLOWED_URI_CHARS_PATTERN
private static final java.util.regex.Pattern USER_IN_HOST
private static final java.util.regex.Pattern URL_WITH_PROTOCOL_PATTERN
private static final java.util.regex.Pattern URL_WITHOUT_PROTOCOL_PATTERN
public URIParsedResult parse(Result result)
ResultParser
Result
's contents as a particular type
of information (email, URL, etc.) and return a ParsedResult
encapsulating
the result of parsing.parse
in class ResultParser
result
- the raw Result
to parseParsedResult
encapsulating the parsing resultstatic boolean isPossiblyMaliciousURI(java.lang.String uri)
static boolean isBasicallyValidURI(java.lang.String uri)