|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.caucho.vfs.Path | +--com.caucho.vfs.FilesystemPath | +--com.caucho.vfs.HttpPath
The HTTP scheme. Currently it supports GET and POST.
TODO: support WEBDAV, enabling the full Path API.
Field Summary | |
protected java.lang.String |
host
|
protected int |
port
|
protected java.lang.String |
query
|
Fields inherited from class com.caucho.vfs.FilesystemPath |
bindRoot, pathname, root, separatorChar, userPath |
Fields inherited from class com.caucho.vfs.Path |
schemeMap |
Method Summary | |
protected Path |
fsWalk(java.lang.String userPath,
java.util.Map attributes,
java.lang.String uri)
Lookup a path relative to the current filesystem's root. |
java.lang.String |
getHost()
Returns the hostname |
int |
getPort()
Returns the port. |
java.lang.String |
getQuery()
Returns the query string of the path. |
java.lang.String |
getScheme()
Returns the url scheme |
java.lang.String |
getURL()
Returns the full url for the given path. |
java.lang.String |
getUserPath()
Returns the last string used as a lookup, if available. |
int |
hashCode()
|
Path |
lookup(java.lang.String userPath,
java.util.Map newAttributes)
Returns a new path relative to the current one. |
StreamImpl |
openReadImpl()
|
StreamImpl |
openReadWriteImpl()
|
protected Path |
schemeWalk(java.lang.String userPath,
java.util.Map attributes,
java.lang.String uri,
int offset)
schemeWalk is called by Path for a scheme lookup like file:/tmp/foo |
java.lang.String |
toString()
|
Methods inherited from class com.caucho.vfs.FilesystemPath |
bind, copy, createRoot, equals, getFullPath, getParent, getPath, getTail, normalizePath, normalizePath, setUserPath |
Methods inherited from class com.caucho.vfs.Path |
canRead, canWrite, createNewFile, createTempFile, exists, getAttribute, getAttributeNames, getContentType, getLastModified, getLength, getNativePath, getValue, isDirectory, isFile, isObject, iterator, list, lookup, lookupNative, lookupNative, mkdir, mkdirs, openAppend, openAppendImpl, openRead, openReadWrite, openWrite, openWriteImpl, remove, removeAttribute, renameTo, renameTo, scanScheme, setAttribute, setLastModified, setValue, unbind, writeToStream |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.lang.String host
protected int port
protected java.lang.String query
Method Detail |
public Path lookup(java.lang.String userPath, java.util.Map newAttributes)
Path
Path only handles scheme:xxx. Subclasses of Path will specialize the xxx.
lookup
in class Path
com.caucho.vfs.Path
userPath
- relative or absolute path, essentially any url.newAttributes
- attributes for the new path.protected Path schemeWalk(java.lang.String userPath, java.util.Map attributes, java.lang.String uri, int offset)
FilesystemPath
schemeWalk
in class FilesystemPath
com.caucho.vfs.FilesystemPath
userPath
- the user's lookup() pathattributes
- the user's attributesfilePath
- the actual lookup() pathoffset
- offset into filePathprotected Path fsWalk(java.lang.String userPath, java.util.Map attributes, java.lang.String uri)
FilesystemPath
fsWalk
in class FilesystemPath
com.caucho.vfs.FilesystemPath
userPath
- the exact string passed by the user's lookup()newAttributes
- the user's new attributesnewPath
- the normalized real pathpublic java.lang.String getScheme()
Path
getScheme
in class Path
public java.lang.String getURL()
Path
getURL
in class FilesystemPath
public java.lang.String getHost()
Path
getHost
in class Path
public int getPort()
Path
getPort
in class Path
public java.lang.String getUserPath()
Path
Path path = Pwd.lookup("/some/dir").lookup("../test.html");
System.out.println(path.getUserPath());
getUserPath
in class FilesystemPath
public java.lang.String getQuery()
Path
getQuery
in class Path
public StreamImpl openReadImpl() throws java.io.IOException
openReadImpl
in class Path
public StreamImpl openReadWriteImpl() throws java.io.IOException
openReadWriteImpl
in class Path
public java.lang.String toString()
toString
in class FilesystemPath
public int hashCode()
hashCode
in class FilesystemPath
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |