ucar.nc2.util
Class URLnaming
java.lang.Object
ucar.nc2.util.URLnaming
public class URLnaming
- extends Object
Networking utilities.
- Author:
- caron
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
URLnaming
public URLnaming()
escapeQueryNew
public static String escapeQueryNew(String urlString)
throws URISyntaxException
- Throws:
URISyntaxException
escapeQuery
public static String escapeQuery(String urlString)
resolve
public static String resolve(String baseUri,
String relativeUri)
- This augments URI.resolve(), by also dealing with file: URIs.
If baseURi is not a file: scheme, then URI.resolve is called.
Otherwise the last "/" is found in the base, and the ref is appended to it.
For file: baseURLS: only reletive URLS not starting with / are supported. This is
apparently different from the behavior of URI.resolve(), so may be trouble,
but it allows NcML absolute location to be specified without the file: prefix.
Example :
base: file://my/guide/collections/designfaq.ncml
ref: sub/my.nc
resolved: file://my/guide/collections/sub/my.nc
- Parameters:
baseUri - base URI as a StrngrelativeUri - reletive URI, as a String
- Returns:
- the resolved URI as a String
canonicalizeRead
public static String canonicalizeRead(String location)
canonicalizeWrite
public static String canonicalizeWrite(String location)
resolveFile
public static String resolveFile(String baseDir,
String filepath)
main1
public static void main1(String[] args)
main2
public static void main2(String[] args)
main3
public static void main3(String[] args)
main4
public static void main4(String[] args)
main5
public static void main5(String[] args)
throws URISyntaxException
- Throws:
URISyntaxException
main
public static void main(String[] args)
throws URISyntaxException
- Throws:
URISyntaxException
Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.