Package org.apache.commons.vfs2.provider
Class URLFileName
java.lang.Object
org.apache.commons.vfs2.provider.AbstractFileName
org.apache.commons.vfs2.provider.GenericFileName
org.apache.commons.vfs2.provider.URLFileName
- All Implemented Interfaces:
- Comparable<FileName>,- FileName
- Direct Known Subclasses:
- UrlFileName
Deprecated.
A file name that represents 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) Deprecated.Create a FileName.protected StringDeprecated.Appends query string to the URI.Deprecated.Gets the path and query string e.g.getPathQueryEncoded(String charset) Deprecated.Gets the path encoded suitable for url like file system e.g.Deprecated.Gets the query string.getURIEncoded(String charset) Deprecated.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- 
URLFileNamepublic URLFileName(String scheme, String hostName, int port, int defaultPort, String userName, String password, String path, FileType type, String queryString) Deprecated.Constructs a new instance.- Parameters:
- scheme- The host scheme.
- hostName- The host name or IP address.
- port- The host port.
- defaultPort- The default host port.
- userName- The user name.
- password- The user password.
- path- The host path.
- type- The file type on the host.
- queryString- The query after the path.
 
 
- 
- 
Method Details- 
createNameDeprecated.Create a FileName.- Overrides:
- createNamein class- GenericFileName
- Parameters:
- absPath- The absolute path.
- type- The FileType.
- Returns:
- The FileName
 
- 
createURIDeprecated.Appends query string to the URI.- Overrides:
- createURIin class- AbstractFileName
- Returns:
- the URI
 
- 
getPathQueryDeprecated.Gets the path and query string e.g. /path/servlet?param1=true.- Returns:
- the path and its query string
 
- 
getPathQueryEncodedpublic String getPathQueryEncoded(String charset) throws org.apache.commons.httpclient.URIException, FileSystemException Deprecated.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:
- org.apache.commons.httpclient.URIException- If an error occurs encoding the URI.
- FileSystemException- If some other error occurs.
 
- 
getQueryStringDeprecated.Gets the query string.- Returns:
- the query string part of the file name
 
- 
getURIEncodedpublic String getURIEncoded(String charset) throws FileSystemException, org.apache.commons.httpclient.URIException Deprecated.Encodes a URI.- Parameters:
- charset- The character set.
- Returns:
- The encoded URI
- Throws:
- FileSystemException- if some other exception occurs.
- org.apache.commons.httpclient.URIException- if an exception occurs encoding the URI.
 
 
- 
GenericURLFileNameas it doesn't depend on HTTP Client v3 API directly.