|
|||||||||
| 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)
PathPath only handles scheme:xxx. Subclasses of Path will specialize the xxx.
lookup in class Pathcom.caucho.vfs.PathuserPath - 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)
FilesystemPathschemeWalk in class FilesystemPathcom.caucho.vfs.FilesystemPathuserPath - the user's lookup() pathattributes - the user's attributesfilePath - the actual lookup() pathoffset - offset into filePath
protected Path fsWalk(java.lang.String userPath,
java.util.Map attributes,
java.lang.String uri)
FilesystemPathfsWalk in class FilesystemPathcom.caucho.vfs.FilesystemPathuserPath - the exact string passed by the user's lookup()newAttributes - the user's new attributesnewPath - the normalized real pathpublic java.lang.String getScheme()
PathgetScheme in class Pathpublic java.lang.String getURL()
PathgetURL in class FilesystemPathpublic java.lang.String getHost()
PathgetHost in class Pathpublic int getPort()
PathgetPort in class Pathpublic java.lang.String getUserPath()
Path
Path path = Pwd.lookup("/some/dir").lookup("../test.html");
System.out.println(path.getUserPath());
getUserPath in class FilesystemPathpublic java.lang.String getQuery()
PathgetQuery in class Path
public StreamImpl openReadImpl()
throws java.io.IOException
openReadImpl in class Path
public StreamImpl openReadWriteImpl()
throws java.io.IOException
openReadWriteImpl in class Pathpublic java.lang.String toString()
toString in class FilesystemPathpublic int hashCode()
hashCode in class FilesystemPath
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||