Class GenericURLFileName

  • All Implemented Interfaces:
    java.lang.Comparable<FileName>, FileName

    public class GenericURLFileName
    extends GenericFileName
    Generic file name that represents a URL.
    • Field Detail

      • queryString

        private final java.lang.String queryString
    • Constructor Detail

      • GenericURLFileName

        public GenericURLFileName​(java.lang.String scheme,
                                  java.lang.String hostName,
                                  int port,
                                  int defaultPort,
                                  java.lang.String userName,
                                  java.lang.String password,
                                  java.lang.String path,
                                  FileType type,
                                  java.lang.String queryString)
    • Method Detail

      • getQueryString

        public java.lang.String getQueryString()
        Gets the query string.
        Returns:
        the query string part of the file name
      • getPathQuery

        public java.lang.String getPathQuery()
        Gets the path and query string e.g. /path/servlet?param1=true.
        Returns:
        the path and its query string
      • getPathQueryEncoded

        public java.lang.String getPathQueryEncoded​(java.lang.String charset)
                                             throws FileSystemException
        Gets the path encoded suitable for url like file system e.g. (http, webdav).
        Parameters:
        charset - the charset used for the path encoding
        Returns:
        The encoded path.
        Throws:
        FileSystemException - If some other error occurs.
      • createName

        public FileName createName​(java.lang.String absPath,
                                   FileType type)
        Creates a FileName.
        Overrides:
        createName in class GenericFileName
        Parameters:
        absPath - The absolute path.
        type - The FileType.
        Returns:
        The FileName
      • createURI

        protected java.lang.String createURI()
        Appends query string to the uri.
        Overrides:
        createURI in class AbstractFileName
        Returns:
        the uri
      • getURIEncoded

        public java.lang.String getURIEncoded​(java.lang.String charset)
                                       throws FileSystemException
        Encodes a URI.
        Parameters:
        charset - The character set.
        Returns:
        The encoded URI
        Throws:
        FileSystemException - if some other exception occurs.