java.lang.Object
org.nibor.autolink.internal.UrlScanner
- All Implemented Interfaces:
Scanner
Scan for URLs starting from the trigger character ":", requires "://".
Based on RFC 3986.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate int
findFirst
(CharSequence input, int beginIndex, int rewindIndex) scan
(CharSequence input, int triggerIndex, int rewindIndex) private static boolean
schemeSpecial
(char c)
-
Constructor Details
-
UrlScanner
public UrlScanner()
-
-
Method Details
-
scan
- Specified by:
scan
in interfaceScanner
- Parameters:
input
- input texttriggerIndex
- the index at which the trigger character for this scanner wasrewindIndex
- the index that can maximally be rewound to (either the very first character of the input or the character after the last matched link) need to be set to be set here- Returns:
- the matched link, or
null
if no link matched
-
findFirst
-
schemeSpecial
private static boolean schemeSpecial(char c)
-