Package com.sun.nfs
Class NfsURL
- java.lang.Object
-
- com.sun.nfs.NfsURL
-
public class NfsURL extends java.lang.Object
This is just a dumb URL parser class. I wrote it because I got fed up with the JDK URL class calling NFS URL's "invalid" simply because the Handler wasn't installed. This URL parser also handles undocumented testing options inserted in the URL in the port field. The following sequence of option letters may appear before or after the port number, or alone if the port number is not given. vn - NFS version, e.g. "v3" u - Force UDP - normally TCP is preferred t - Force TDP - don't fall back to UDP m - Force Mount protocol. Normally public filehandle is preferred Option ordering is not important. Example: nfs://server:123v2um/path Use port 123 with NFS v2 over UDP and Mount protocol nfs://server:m/path Use default port, prefer V3/TCP but use Mount protocol- Author:
- Brent Callaghan
-
-
Constructor Summary
Constructors Constructor Description NfsURL(java.lang.String url)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getFile()
java.lang.String
getHost()
java.lang.String
getLocation()
int
getPort()
java.lang.String
getProtocol()
java.lang.String
toString()
-
-
-
Method Detail
-
getProtocol
public java.lang.String getProtocol()
-
getLocation
public java.lang.String getLocation()
-
getHost
public java.lang.String getHost()
-
getPort
public int getPort()
-
getFile
public java.lang.String getFile()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-