Top Description Fields Constructors Methods
org.apache.commons.text.lookup

pack-priv final Class UrlStringLookup

extends AbstractStringLookup
Class Inheritance
Imports
java.io.BufferedInputStream, .InputStreamReader, .StringWriter, java.net.URL, org.apache.commons.lang3.StringUtils

Looks up keys from an XML document.

Looks up the value for a given key in the format "Charset:URL".

For example: "UTF-8:https://www.apache.org".

Public access is through StringLookupFactory.

Since
1.5
See Also
StringLookupFactory

Field Summary

Modifier and TypeField and Description
pack-priv static final UrlStringLookup
INSTANCE

Defines the singleton for this class.

Inherited from org.apache.commons.text.lookup.AbstractStringLookup:
SPLIT_CHSPLIT_STR

Constructor Summary

AccessConstructor and Description
private
UrlStringLookup()

No need to build instances for now.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The value associated with the key.
lookup
(final String
the key to be looked up, may be null.
key
)

Implements org.apache.commons.text.lookup.StringLookup.lookup.

Looks up the value for the key in the format "DocumentPath:URL".

Inherited from org.apache.commons.text.lookup.AbstractStringLookup:
substringAftersubstringAftersubstringAfterLasttoLookupKeytoLookupKey

Field Detail

INSTANCEback to summary
pack-priv static final UrlStringLookup INSTANCE

Defines the singleton for this class.

Constructor Detail

UrlStringLookupback to summary
private UrlStringLookup()

No need to build instances for now.

Method Detail

lookupback to summary
public String lookup(final String key)

Implements org.apache.commons.text.lookup.StringLookup.lookup.

Looks up the value for the key in the format "DocumentPath:URL".

For example: "UTF-8:https://www.apache.org".

Parameters
key:String

the key to be looked up, may be null.

Returns:String

The value associated with the key.

Annotations
@Override