Class URLParser
java.lang.Object
io.mola.galimatias.URLParser
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static enumstatic enumParse URL states as defined by WHATWG URL spec. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final URLprivate intprivate intprivate intprivate final Stringprivate booleanprivate URLParsingSettingsprivate intprivate final URLParser.ParseURLStateprivate final URL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate charat(int i) private voiddecrIdx()private voidprivate voidhandleError(GalimatiasParseException parseException) private voidhandleError(String message) private voidhandleFatalError(GalimatiasParseException parseException) private voidhandleFatalError(String message) private voidhandleFatalIllegalCharacterError(String message) private voidhandleFatalInvalidHostError(Exception exception) private voidprivate voidhandleIllegalCharacterError(String message) private voidprivate voidprivate voidincIdx()private booleanisInDefaultEncodeSet(int c) private booleanisInPasswordEncodeSet(int c) private booleanisInSimpleEncodeSet(int c) private booleanisInUsernameEncodeSet(int c) parse()(package private) String(package private) Stringprivate voidsetIdx(int i) settings(URLParsingSettings settings) private voidutf8PercentEncode(int c, URLParser.EncodeSet encodeSet, StringBuilder buffer)
-
Field Details
-
base
-
input
-
url
-
stateOverride
-
settings
-
startIdx
private int startIdx -
endIdx
private int endIdx -
idx
private int idx -
isEOF
private boolean isEOF -
c
private int c
-
-
Constructor Details
-
URLParser
-
URLParser
-
URLParser
-
URLParser
-
-
Method Details
-
settings
-
setIdx
private void setIdx(int i) -
incIdx
private void incIdx() -
decrIdx
private void decrIdx() -
at
private char at(int i) -
handleError
- Throws:
GalimatiasParseException
-
handleError
- Throws:
GalimatiasParseException
-
handleFatalError
private void handleFatalError(GalimatiasParseException parseException) throws GalimatiasParseException - Throws:
GalimatiasParseException
-
handleFatalError
- Throws:
GalimatiasParseException
-
handleInvalidPercentEncodingError
- Throws:
GalimatiasParseException
-
handleBackslashAsDelimiterError
- Throws:
GalimatiasParseException
-
handleIllegalWhitespaceError
- Throws:
GalimatiasParseException
-
handleIllegalCharacterError
- Throws:
GalimatiasParseException
-
handleFatalMissingSchemeError
- Throws:
GalimatiasParseException
-
handleFatalIllegalCharacterError
- Throws:
GalimatiasParseException
-
handleFatalInvalidHostError
- Throws:
GalimatiasParseException
-
parse
- Throws:
GalimatiasParseException
-
parseUsername
String parseUsername() -
parsePassword
String parsePassword() -
utf8PercentEncode
-
isInSimpleEncodeSet
private boolean isInSimpleEncodeSet(int c) -
isInDefaultEncodeSet
private boolean isInDefaultEncodeSet(int c) -
isInPasswordEncodeSet
private boolean isInPasswordEncodeSet(int c) -
isInUsernameEncodeSet
private boolean isInUsernameEncodeSet(int c)
-