Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.caucho.vfs
Class HttpPath

    java.lang.Object
      |
      +--com.caucho.vfs.Path
            |
            +--com.caucho.vfs.FilesystemPath
                  |
                  +--com.caucho.vfs.HttpPath

public class HttpPath
extends FilesystemPath

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

### host

    protected java.lang.String host

### port

    protected int port

### query

    protected java.lang.String query

Method Detail

### lookup

    public Path lookup(java.lang.String userPath,
                       java.util.Map newAttributes)

  Description copied from class: Path
  Returns a new path relative to the current one.

  Path only handles scheme:xxx. Subclasses of Path will specialize the xxx.

  Overrides:
    lookup in class Path
  Tags copied from class: Path
  Parameters:
    `userPath` - relative or absolute path, essentially any url.
    `newAttributes` - attributes for the new path.
  Returns:
    the new path or null if the scheme doesn't exist

### schemeWalk

    protected Path schemeWalk(java.lang.String userPath,
                              java.util.Map attributes,
                              java.lang.String uri,
                              int offset)

  Description copied from class: FilesystemPath
  schemeWalk is called by Path for a scheme lookup like file:/tmp/foo
  Overrides:
    schemeWalk in class FilesystemPath
  Tags copied from class: FilesystemPath
  Parameters:
    `userPath` - the user's lookup() path
    `attributes` - the user's attributes
    `filePath` - the actual lookup() path
    `offset` - offset into filePath

### fsWalk

    protected Path fsWalk(java.lang.String userPath,
                          java.util.Map attributes,
                          java.lang.String uri)

  Description copied from class: FilesystemPath
  Lookup a path relative to the current filesystem's root. Filesystems will specialize fsWalk.
  Overrides:
    fsWalk in class FilesystemPath
  Tags copied from class: FilesystemPath
  Parameters:
    `userPath` - the exact string passed by the user's lookup()
    `newAttributes` - the user's new attributes
    `newPath` - the normalized real path
  Returns:
    the matching path

### getScheme

    public java.lang.String getScheme()

  Description copied from class: Path
  Returns the url scheme
  Overrides:
    getScheme in class Path

### getURL

    public java.lang.String getURL()

  Description copied from class: Path
  Returns the full url for the given path.
  Overrides:
    getURL in class FilesystemPath

### getHost

    public java.lang.String getHost()

  Description copied from class: Path
  Returns the hostname
  Overrides:
    getHost in class Path

### getPort

    public int getPort()

  Description copied from class: Path
  Returns the port.
  Overrides:
    getPort in class Path

### getUserPath

    public java.lang.String getUserPath()

  Description copied from class: Path
  Returns the last string used as a lookup, if available. This allows parsers to give intelligent error messages, with the user's path instead of the whole path. The following will print '../test.html': `

       Path path = Pwd.lookup("/some/dir").lookup("../test.html");
       System.out.println(path.getUserPath());

  `
  Overrides:
    getUserPath in class FilesystemPath

### getQuery

    public java.lang.String getQuery()

  Description copied from class: Path
  Returns the query string of the path.
  Overrides:
    getQuery in class Path

### openReadImpl

    public StreamImpl openReadImpl()
                            throws java.io.IOException

  Overrides:
    openReadImpl in class Path

### openReadWriteImpl

    public StreamImpl openReadWriteImpl()
                                 throws java.io.IOException

  Overrides:
    openReadWriteImpl in class Path

### toString

    public java.lang.String toString()

  Overrides:
    toString in class FilesystemPath

### hashCode

    public int hashCode()

  Overrides:
    hashCode in class FilesystemPath

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD