Package com.sun.nfs

Class 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)  
    • Constructor Detail

      • NfsURL

        public NfsURL​(java.lang.String url)
               throws java.net.MalformedURLException
        Throws:
        java.net.MalformedURLException
    • 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 class java.lang.Object