org.apache.commons.vfs.provider
Class URLFileName
java.lang.Object
org.apache.commons.vfs.provider.AbstractFileName
org.apache.commons.vfs.provider.GenericFileName
org.apache.commons.vfs.provider.URLFileName
- All Implemented Interfaces:
- java.lang.Comparable, FileName
- Direct Known Subclasses:
- UrlFileName
public class URLFileName
- extends GenericFileName
Constructor Summary |
URLFileName(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 Summary |
FileName |
createName(java.lang.String absPath,
FileType type)
Factory method for creating name instances. |
protected java.lang.String |
createURI()
append query string to the uri |
java.lang.String |
getPathQuery()
get the path and query string e.g. |
java.lang.String |
getPathQueryEncoded(java.lang.String charset)
get the path encoded suitable for url like filesystem e.g. |
java.lang.String |
getQueryString()
get the query string |
java.lang.String |
getURIEncoded(java.lang.String charset)
|
Methods inherited from class org.apache.commons.vfs.provider.AbstractFileName |
checkName, compareTo, equals, getBaseName, getDepth, getExtension, getFriendlyURI, getParent, getPath, getPathDecoded, getRelativeName, getRoot, getRootURI, getScheme, getType, getURI, getUriTrailer, hashCode, isAncestor, isDescendent, isDescendent, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
URLFileName
public URLFileName(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)
getQueryString
public java.lang.String getQueryString()
- get the query string
- Returns:
- the query string part of the filename
getPathQuery
public java.lang.String getPathQuery()
- get 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 org.apache.commons.httpclient.URIException,
FileSystemException
- get the path encoded suitable for url like filesystem e.g. (http, webdav)
- Parameters:
charset
- the charset used for the path encoding
- Throws:
org.apache.commons.httpclient.URIException
FileSystemException
createName
public FileName createName(java.lang.String absPath,
FileType type)
- Description copied from class:
AbstractFileName
- Factory method for creating name instances.
- Overrides:
createName
in class GenericFileName
createURI
protected java.lang.String createURI()
- append 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,
org.apache.commons.httpclient.URIException
- Throws:
FileSystemException
org.apache.commons.httpclient.URIException