Top Description Constructors Methods
org.nibor.autolink.internal

public Class UrlScanner

extends Object
implements Scanner
Class Inheritance
All Implemented Interfaces
org.nibor.autolink.internal.Scanner
Imports
org.nibor.autolink.LinkSpan, .LinkType

Scan for URLs starting from the trigger character ":", requires "://".

Based on RFC 3986.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private int
findFirst(CharSequence input, int beginIndex, int rewindIndex)

public LinkSpan
scan(CharSequence
input text
input
,
int
the index at which the trigger character for this scanner was
triggerIndex
,
int
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
rewindIndex
)

Implements org.nibor.autolink.internal.Scanner.scan.

private static boolean
schemeSpecial(char c)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

UrlScannerback to summary
public UrlScanner()

Method Detail

findFirstback to summary
private int findFirst(CharSequence input, int beginIndex, int rewindIndex)
scanback to summary
public LinkSpan scan(CharSequence input, int triggerIndex, int rewindIndex)

Implements org.nibor.autolink.internal.Scanner.scan.

Parameters
input:CharSequence

Doc from org.nibor.autolink.internal.Scanner.scan.

input text

triggerIndex:int

Doc from org.nibor.autolink.internal.Scanner.scan.

the index at which the trigger character for this scanner was

rewindIndex:int

Doc from org.nibor.autolink.internal.Scanner.scan.

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:LinkSpan

Doc from org.nibor.autolink.internal.Scanner.scan.

the matched link, or null if no link matched

Annotations
@Override
schemeSpecialback to summary
private static boolean schemeSpecial(char c)