Class TrieParser
java.lang.Object
com.google.thirdparty.publicsuffix.TrieParser
Parser for a map of reversed domain names stored as a serialized radix tree.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static int
doParseTrieToBuilder
(Deque<CharSequence> stack, CharSequence encoded, int start, ImmutableMap.Builder<String, PublicSuffixType> builder) Parses a trie node and returns the number of characters consumed.(package private) static ImmutableMap
<String, PublicSuffixType> parseFullString
(String encoded) (package private) static ImmutableMap
<String, PublicSuffixType> parseTrie
(CharSequence... encodedChunks) Parses a serialized trie representation of a map of reversed public suffixes into an immutable map of public suffixes.private static CharSequence
-
Field Details
-
DIRECT_JOINER
-
-
Constructor Details
-
TrieParser
TrieParser()
-
-
Method Details
-
parseTrie
Parses a serialized trie representation of a map of reversed public suffixes into an immutable map of public suffixes. The encoded trie string may be broken into multiple chunks to avoid the 64k limit on string literal size. In-memory strings can be much larger (2G). -
parseFullString
-
doParseTrieToBuilder
private static int doParseTrieToBuilder(Deque<CharSequence> stack, CharSequence encoded, int start, ImmutableMap.Builder<String, PublicSuffixType> builder) Parses a trie node and returns the number of characters consumed.- Parameters:
stack
- The prefixes that precede the characters represented by this node. Each entry of the stack is in reverse order.encoded
- The serialized trie.start
- An index in the encoded serialized trie to begin reading characters from.builder
- A map builder to which all entries will be added.- Returns:
- The number of characters consumed from
encoded
.
-
reverse
-