|
|||||||||
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 static LruCache |
cache
|
protected com.caucho.vfs.HttpPath.CacheEntry |
cacheEntry
|
protected java.lang.String |
host
|
protected static L10N |
L
|
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 | |
boolean |
canRead()
Returns true if the file is readable. |
boolean |
equals(java.lang.Object o)
Overrides equals to test for equality with an HTTP path. |
boolean |
exists()
Returns true if the file exists. |
protected Path |
fsWalk(java.lang.String userPath,
java.util.Map attributes,
java.lang.String uri)
Scans the path portion of the URI, i.e. |
protected com.caucho.vfs.HttpPath.CacheEntry |
getCache()
|
java.lang.String |
getHost()
Returns the host part of the url. |
long |
getLastModified()
Returns the last modified time. |
long |
getLength()
Returns the file's length |
int |
getPort()
Returns the port part of the url. |
java.lang.String |
getQuery()
Returns the query string. |
java.lang.String |
getScheme()
Returns the scheme, http. |
java.lang.String |
getURL()
Returns a full URL for the path. |
java.lang.String |
getUserPath()
Returns the user's path. |
int |
hashCode()
Returns a hashCode for the path. |
boolean |
isDirectory()
Returns the last modified time. |
boolean |
isFile()
Returns true if the file exists. |
Path |
lookup(java.lang.String userPath,
java.util.Map newAttributes)
Overrides the default lookup to parse the host and port before parsing the path. |
StreamImpl |
openReadImpl()
Returns a read stream for a GET request. |
StreamImpl |
openReadWriteImpl()
Returns a read/write pair for a POST request. |
protected Path |
schemeWalk(java.lang.String userPath,
java.util.Map attributes,
java.lang.String uri,
int offset)
Walk down the path starting from the portion immediately following the scheme. |
java.lang.String |
toString()
Returns the string form of the http path. |
Methods inherited from class com.caucho.vfs.FilesystemPath |
bind, copy, createRoot, getFullPath, getParent, getPath, getTail, normalizePath, normalizePath, setUserPath |
Methods inherited from class com.caucho.vfs.Path |
canWrite, createNewFile, createRoot, createTempFile, getAttribute, getAttributeNames, getContentType, getNativePath, getObject, getResources, getResources, getValue, isObject, iterator, list, lookup, lookupNative, lookupNative, mkdir, mkdirs, openAppend, openAppendImpl, openRead, openReadWrite, openReadWrite, openWrite, openWriteImpl, remove, removeAttribute, renameTo, renameTo, scanScheme, setAttribute, setLastModified, setObject, setValue, unbind, writeToStream |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static L10N L
protected static LruCache cache
protected java.lang.String host
protected int port
protected java.lang.String query
protected com.caucho.vfs.HttpPath.CacheEntry cacheEntry
Method Detail |
public Path lookup(java.lang.String userPath, java.util.Map newAttributes)
lookup
in class Path
userPath
- the path passed in by the usernewAttributes
- attributes passed by the userprotected Path schemeWalk(java.lang.String userPath, java.util.Map attributes, java.lang.String uri, int offset)
schemeWalk
in class FilesystemPath
userPath
- the user's passed in pathattributes
- the attributes for the new pathuri
- the normalized full urioffset
- offset into the uri to start processing, i.e. after the
scheme.protected Path fsWalk(java.lang.String userPath, java.util.Map attributes, java.lang.String uri)
fsWalk
in class FilesystemPath
userPath
- the user's supplied pathattributes
- the attributes for the new pathuri
- the full uri for the new path.public java.lang.String getScheme()
getScheme
in class Path
public java.lang.String getURL()
getURL
in class FilesystemPath
public java.lang.String getHost()
getHost
in class Path
public int getPort()
getPort
in class Path
public java.lang.String getUserPath()
getUserPath
in class FilesystemPath
public java.lang.String getQuery()
getQuery
in class Path
public long getLastModified()
getLastModified
in class Path
com.caucho.vfs.Path
public long getLength()
getLength
in class Path
com.caucho.vfs.Path
public boolean exists()
exists
in class Path
public boolean isFile()
isFile
in class Path
public boolean canRead()
canRead
in class Path
public boolean isDirectory()
isDirectory
in class Path
protected com.caucho.vfs.HttpPath.CacheEntry getCache()
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
public boolean equals(java.lang.Object o)
equals
in class FilesystemPath
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |