| java.lang.Object com.caucho.vfs.Path com.caucho.vfs.FilesystemPath com.caucho.vfs.HttpPath
All known Subclasses: com.caucho.vfs.HttpsPath,
HttpPath | public class HttpPath extends FilesystemPath (Code) | | The HTTP scheme. Currently it supports GET and POST.
TODO: support WEBDAV, enabling the full Path API.
|
Inner Class :static class CacheEntry | |
Method Summary | |
protected Path | cacheCopy() | public boolean | canRead() Returns true if the file is readable. | protected HttpPath | create(String host, int port) | protected HttpPath | create(FilesystemPath root, String userPath, Map<String, Object> newAttributes, String path, String query) | public boolean | equals(Object o) Overrides equals to test for equality with an HTTP path. | public boolean | exists() Returns true if the file exists. | public Path | fsWalk(String userPath, Map<String, Object> attributes, String uri) Scans the path portion of the URI, i.e. | protected CacheEntry | getCache() | public String | getHost() Returns the host part of the url. | public long | getLastModified() Returns the last modified time. | public long | getLength() | public int | getPort() Returns the port part of the url. | public String | getQuery() Returns the query string. | public String | getScheme() Returns the scheme, http. | public String | getURL() Returns a full URL for the path. | public String | getUserPath() Returns the user's path. | public String | getVirtualHost() Returns the virtual host, if any. | public int | hashCode() Returns a hashCode for the path. | public boolean | isDirectory() Returns the last modified time. | public boolean | isFile() Returns true if the file exists. | public Path | lookupImpl(String userPath, Map<String, Object> newAttributes) Overrides the default lookup to parse the host and port
before parsing the path. | public StreamImpl | openReadImpl() Returns a read stream for a GET request. | public StreamImpl | openReadWriteImpl() Returns a read/write pair for a POST request. | protected Path | schemeWalk(String userPath, Map<String, Object> attributes, String uri, int offset) Walk down the path starting from the portion immediately following
the scheme. | public String | toString() Returns the string form of the http path. |
_cacheEntry | protected CacheEntry _cacheEntry(Code) | | |
_port | protected int _port(Code) | | |
HttpPath | public HttpPath(String host, int port)(Code) | | Creates a new HTTP root path with a host and a port.
Parameters: host - the target host Parameters: port - the target port, if zero, uses port 80. |
HttpPath | HttpPath(FilesystemPath root, String userPath, Map<String, Object> newAttributes, String path, String query)(Code) | | Creates a new HTTP sub path.
Parameters: root - the HTTP filesystem root Parameters: userPath - the argument to the calling lookup() Parameters: newAttributes - any attributes passed to http Parameters: path - the full normalized path Parameters: query - any query string |
canRead | public boolean canRead()(Code) | | Returns true if the file is readable.
|
equals | public boolean equals(Object o)(Code) | | Overrides equals to test for equality with an HTTP path.
|
exists | public boolean exists()(Code) | | Returns true if the file exists.
|
fsWalk | public Path fsWalk(String userPath, Map<String, Object> attributes, String uri)(Code) | | Scans the path portion of the URI, i.e. everything after the
host and port.
Parameters: userPath - the user's supplied path Parameters: attributes - the attributes for the new path Parameters: uri - the full uri for the new path. the found path. |
getCache | protected CacheEntry getCache()(Code) | | The contents of this directory or null if the path does notrefer to a directory. |
getHost | public String getHost()(Code) | | Returns the host part of the url.
|
getLastModified | public long getLastModified()(Code) | | Returns the last modified time.
|
getLength | public long getLength()(Code) | | Returns the file's length
|
getPort | public int getPort()(Code) | | Returns the port part of the url.
|
getQuery | public String getQuery()(Code) | | Returns the query string.
|
getScheme | public String getScheme()(Code) | | Returns the scheme, http.
|
getURL | public String getURL()(Code) | | Returns a full URL for the path.
|
getUserPath | public String getUserPath()(Code) | | Returns the user's path.
|
getVirtualHost | public String getVirtualHost()(Code) | | Returns the virtual host, if any.
|
hashCode | public int hashCode()(Code) | | Returns a hashCode for the path.
|
isDirectory | public boolean isDirectory()(Code) | | Returns the last modified time.
|
isFile | public boolean isFile()(Code) | | Returns true if the file exists.
|
lookupImpl | public Path lookupImpl(String userPath, Map<String, Object> newAttributes)(Code) | | Overrides the default lookup to parse the host and port
before parsing the path.
Parameters: userPath - the path passed in by the user Parameters: newAttributes - attributes passed by the user the final path. |
schemeWalk | protected Path schemeWalk(String userPath, Map<String, Object> attributes, String uri, int offset)(Code) | | Walk down the path starting from the portion immediately following
the scheme. i.e. schemeWalk is responsible for parsing the host and
port from the URL.
Parameters: userPath - the user's passed in path Parameters: attributes - the attributes for the new path Parameters: uri - the normalized full uri Parameters: offset - offset into the uri to start processing, i.e. after thescheme. the looked-up path. |
toString | public String toString()(Code) | | Returns the string form of the http path.
|
Methods inherited from com.caucho.vfs.FilesystemPath | public void bind(Path context)(Code)(Java Doc) public Path createRoot(SchemeMap schemeMap)(Code)(Java Doc) public boolean equals(Object b)(Code)(Java Doc) abstract public Path fsWalk(String userPath, Map<String, Object> newAttributes, String newPath)(Code)(Java Doc) public String getFullPath()(Code)(Java Doc) public Path getParent()(Code)(Java Doc) public String getPath()(Code)(Java Doc) public FilesystemPath getRoot()(Code)(Java Doc) public String getTail()(Code)(Java Doc) public String getUserPath()(Code)(Java Doc) public int hashCode()(Code)(Java Doc) protected static String normalizePath(String oldPath, String newPath, int offset, char separatorChar)(Code)(Java Doc) protected static void normalizePath(CharBuffer cb, String oldPath, String newPath, int offset, char separatorChar)(Code)(Java Doc) protected Path schemeWalk(String userPath, Map<String, Object> attributes, String filePath, int offset)(Code)(Java Doc) public void setUserPath(String path)(Code)(Java Doc)
|
Methods inherited from com.caucho.vfs.Path | public void bind(Path context)(Code)(Java Doc) protected Path cacheCopy()(Code)(Java Doc) public boolean canExecute()(Code)(Java Doc) public boolean canRead()(Code)(Java Doc) public boolean canWrite()(Code)(Java Doc) public boolean changeGroup(int gid) throws IOException(Code)(Java Doc) public boolean changeGroup(String groupName) throws IOException(Code)(Java Doc) public boolean changeOwner(int uid) throws IOException(Code)(Java Doc) public boolean changeOwner(String ownerName) throws IOException(Code)(Java Doc) public boolean chmod(int value)(Code)(Java Doc) protected Path copy()(Code)(Java Doc) public PersistentDependency createDepend()(Code)(Java Doc) public boolean createLink(Path target, boolean hardLink) throws IOException(Code)(Java Doc) public boolean createNewFile() throws IOException(Code)(Java Doc) public Path createRoot()(Code)(Java Doc) public Path createRoot(SchemeMap schemeMap)(Code)(Java Doc) public Path createTempFile(String prefix, String suffix) throws IOException(Code)(Java Doc) public boolean equals(Object o)(Code)(Java Doc) protected static String escapeURL(String rawURL)(Code)(Java Doc) public boolean exists()(Code)(Java Doc) public Object getAttribute(String name) throws IOException(Code)(Java Doc) public Iterator getAttributeNames() throws IOException(Code)(Java Doc) public long getBlockCount()(Code)(Java Doc) public long getBlockSize()(Code)(Java Doc) public Certificate[] getCertificates()(Code)(Java Doc) public String getContentType()(Code)(Java Doc) public long getCrc64()(Code)(Java Doc) public long getCreateTime()(Code)(Java Doc) public long getDevice()(Code)(Java Doc) public long getDeviceId()(Code)(Java Doc) public long getDiskSpaceFree()(Code)(Java Doc) public long getDiskSpaceTotal()(Code)(Java Doc) final public static char getFileSeparatorChar()(Code)(Java Doc) public String getFullPath()(Code)(Java Doc) public int getGroup()(Code)(Java Doc) public String getHost()(Code)(Java Doc) public long getInode()(Code)(Java Doc) public long getLastAccessTime()(Code)(Java Doc) public long getLastModified()(Code)(Java Doc) public long getLastStatusChangeTime()(Code)(Java Doc) public long getLength()(Code)(Java Doc) public int getMode()(Code)(Java Doc) public String getNativePath()(Code)(Java Doc) public static String getNewlineString()(Code)(Java Doc) public int getNumberOfLinks()(Code)(Java Doc) public Object getObject() throws IOException(Code)(Java Doc) public int getOwner()(Code)(Java Doc) public Path getParent()(Code)(Java Doc) abstract public String getPath()(Code)(Java Doc) final public static char getPathSeparatorChar()(Code)(Java Doc) public int getPort()(Code)(Java Doc) public String getQuery()(Code)(Java Doc) public String getRelativePath()(Code)(Java Doc) public ArrayList<Path> getResources(String name)(Code)(Java Doc) public ArrayList<Path> getResources()(Code)(Java Doc) abstract public String getScheme()(Code)(Java Doc) final protected static char getSeparatorChar()(Code)(Java Doc) public String getTail()(Code)(Java Doc) public String getURL()(Code)(Java Doc) public int getUser()(Code)(Java Doc) protected static String getUserDir()(Code)(Java Doc) public String getUserPath()(Code)(Java Doc) public Object getValue() throws Exception(Code)(Java Doc) public int hashCode()(Code)(Java Doc) public boolean isBlockDevice()(Code)(Java Doc) public boolean isCharacterDevice()(Code)(Java Doc) public boolean isDirectory()(Code)(Java Doc) public boolean isExecutable()(Code)(Java Doc) public boolean isFIFO()(Code)(Java Doc) public boolean isFile()(Code)(Java Doc) public boolean isHardLink()(Code)(Java Doc) public boolean isLink()(Code)(Java Doc) public boolean isObject()(Code)(Java Doc) protected boolean isPathCacheable()(Code)(Java Doc) public boolean isSocket()(Code)(Java Doc) public boolean isSymbolicLink()(Code)(Java Doc) final public static boolean isWindows()(Code)(Java Doc) public boolean isWindowsInsecure()(Code)(Java Doc) public Iterator<String> iterator() throws IOException(Code)(Java Doc) public String[] list() throws IOException(Code)(Java Doc) final public Path lookup(String name)(Code)(Java Doc) public Path lookup(String userPath, Map<String, Object> newAttributes)(Code)(Java Doc) public Path lookupImpl(String userPath, Map<String, Object> newAttributes)(Code)(Java Doc) final public Path lookupNative(String name)(Code)(Java Doc) public Path lookupNative(String name, Map<String, Object> attributes)(Code)(Java Doc) public String lookupRelativeNativePath(Path path)(Code)(Java Doc) public boolean mkdir() throws IOException(Code)(Java Doc) public boolean mkdirs() throws IOException(Code)(Java Doc) public WriteStream openAppend() throws IOException(Code)(Java Doc) public StreamImpl openAppendImpl() throws IOException(Code)(Java Doc) public RandomAccessStream openRandomAccess() throws IOException(Code)(Java Doc) final public ReadStream openRead() throws IOException(Code)(Java Doc) public StreamImpl openReadImpl() throws IOException(Code)(Java Doc) public ReadWritePair openReadWrite() throws IOException(Code)(Java Doc) public void openReadWrite(ReadStream is, WriteStream os) throws IOException(Code)(Java Doc) public StreamImpl openReadWriteImpl() throws IOException(Code)(Java Doc) final public WriteStream openWrite() throws IOException(Code)(Java Doc) public StreamImpl openWriteImpl() throws IOException(Code)(Java Doc) public boolean remove() throws IOException(Code)(Java Doc) public boolean removeAll() throws IOException(Code)(Java Doc) public boolean renameTo(Path path) throws IOException(Code)(Java Doc) final public boolean renameTo(String path) throws IOException(Code)(Java Doc) protected String scanScheme(String uri)(Code)(Java Doc) abstract protected Path schemeWalk(String userPath, Map<String, Object> newAttributes, String newPath, int offset)(Code)(Java Doc) final public static void setDefaultSchemeMap(SchemeMap schemeMap)(Code)(Java Doc) public boolean setExecutable(boolean isExecutable)(Code)(Java Doc) public void setLastModified(long time)(Code)(Java Doc) public void setObject(Object obj) throws IOException(Code)(Java Doc) final public static void setTestWindows(boolean isTest)(Code)(Java Doc) public void setUserPath(String userPath)(Code)(Java Doc) public void setValue(Object obj) throws Exception(Code)(Java Doc) public String toString()(Code)(Java Doc) public boolean truncate() throws IOException(Code)(Java Doc) public boolean truncate(long length) throws IOException(Code)(Java Doc) public void unbind()(Code)(Java Doc) public void writeToStream(OutputStream os) throws IOException(Code)(Java Doc) public void writeToStream(OutputStreamWithBuffer os) throws IOException(Code)(Java Doc)
|
|
|