public class URLMapDefault extends java.lang.Object implements URLMap
URLMap.Result| Constructor and Description |
|---|
URLMapDefault() |
| Modifier and Type | Method and Description |
|---|---|
void |
addEntry(java.lang.String urlpath,
java.lang.String fileprefix)
Add an entry into the map.
|
void |
load(java.lang.String filepath) |
protected URLMap.Result |
longestmatch(java.util.SortedMap<java.lang.String,java.lang.String> map,
java.lang.String prefix) |
URLMap.Result |
mapPath(java.lang.String path)
Inverse of mapURL; returns a url path and suffix: U,S
such that mapURL(U)+S = path
Return a Pair specifying:
1.
|
URLMap.Result |
mapURL(java.lang.String urlpath)
Use some maximal prefix of the url path
to locate the associated file path prefix.
|
java.lang.String |
toString() |
public void addEntry(java.lang.String urlpath,
java.lang.String fileprefix)
throws dap4.core.util.DapException
URLMappublic void load(java.lang.String filepath)
throws java.io.IOException
java.io.IOExceptionpublic URLMap.Result mapURL(java.lang.String urlpath) throws dap4.core.util.DapException
URLMapmapURL in interface URLMapurlpath - a string specifying the url path to be mappeddap4.core.util.DapException - if the map fails
Note that this map does not deal with the whole url, only the path part
because as a rule, the host+port is unknown at the time the map is built
and also because there might be multiple hosts using the same map.public URLMap.Result mapPath(java.lang.String path) throws dap4.core.util.DapException
URLMapprotected URLMap.Result longestmatch(java.util.SortedMap<java.lang.String,java.lang.String> map, java.lang.String prefix)
public java.lang.String toString()
toString in class java.lang.Object