Package org.apache.commons.vfs2.provider
Class GenericURLFileName
java.lang.Object
org.apache.commons.vfs2.provider.AbstractFileName
org.apache.commons.vfs2.provider.GenericFileName
org.apache.commons.vfs2.provider.GenericURLFileName
- All Implemented Interfaces:
- Comparable<FileName>,- FileName
Generic file name that represents a URL.
- 
Field SummaryFields inherited from interface org.apache.commons.vfs2.FileNameEMPTY_ARRAY, ROOT_PATH, SEPARATOR, SEPARATOR_CHAR
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptioncreateName(String absPath, FileType type) Creates a FileName.protected StringAppends query string to the uri.Gets the path and query string e.g.getPathQueryEncoded(String charset) Gets the path encoded suitable for url like file system e.g.Gets the query string.getURIEncoded(String charset) Encodes a URI.Methods inherited from class org.apache.commons.vfs2.provider.GenericFileNameappendCredentials, appendRootUri, getDefaultPort, getHostName, getPassword, getPort, getUserNameMethods inherited from class org.apache.commons.vfs2.provider.AbstractFileNamecheckName, compareTo, equals, getBaseName, getDepth, getExtension, getFriendlyURI, getParent, getPath, getPathDecoded, getRelativeName, getRoot, getRootURI, getScheme, getType, getURI, getUriTrailer, hashCode, isAncestor, isDescendent, isDescendent, isFile, toString
- 
Constructor Details- 
GenericURLFileNamepublic GenericURLFileName(String scheme, String hostName, int port, int defaultPort, String userName, String password, String path, FileType type, String queryString) Constructs a new instance.- Parameters:
- scheme- Host scheme.
- hostName- Host name or IP address.
- port- Host port.
- defaultPort- Default host port.
- userName- user name.
- password- user password.
- path- Path on the host.
- type- File type on the host.
- queryString- Query string for the path.
 
 
- 
- 
Method Details- 
createNameCreates a FileName.- Overrides:
- createNamein class- GenericFileName
- Parameters:
- absPath- The absolute path.
- type- The FileType.
- Returns:
- The FileName
 
- 
createURIAppends query string to the uri.- Overrides:
- createURIin class- AbstractFileName
- Returns:
- the uri
 
- 
getPathQueryGets the path and query string e.g. /path/servlet?param1=true.- Returns:
- the path and its query string
 
- 
getPathQueryEncodedGets 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.
 
- 
getQueryStringGets the query string.- Returns:
- the query string part of the file name
 
- 
getURIEncodedEncodes a URI.- Parameters:
- charset- The character set.
- Returns:
- The encoded URI
- Throws:
- FileSystemException- if some other exception occurs.
 
 
-