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 JarPath

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

public class JarPath
extends FilesystemPath

A filesystem for .jar files.

Fields inherited from class com.caucho.vfs.FilesystemPath
`bindRoot, pathname, root, separatorChar, userPath`

Fields inherited from class com.caucho.vfs.Path
`L, schemeMap`

Constructor Summary
`protected` | `JarPath(FilesystemPath root, java.lang.String userPath, java.lang.String path, Path backing)` Creates a new jar path for the specific file
`` | `JarPath(Path backing)`

Method Summary
`boolean` | `canRead()` Tests if the file can be read.
`boolean` | `canWrite()` Tests if the file can be written.
`boolean` | `exists()` Returns true if the entry exists in the jar file.
`protected Path` | `fsWalk(java.lang.String userPath, java.util.Map attributes, java.lang.String path)` Lookup a path relative to the current filesystem's root.
`Path` | `getContainer()` Returns the underlying file below the jar.
`protected com.caucho.vfs.Jar` | `getJar()`
`long` | `getLastModified()` Returns the last modified time of the file.
`long` | `getLength()` Returns the length of the file in bytes.
`java.lang.String` | `getScheme()` Returns the scheme (jar)
`java.lang.String` | `getURL()` Returns the full url.
`int` | `hashCode()`
`boolean` | `isDirectory()` Returns true if the entry is a directory in the jar file.
`boolean` | `isFile()` Returns true if the entry is a file in the jar file.
`java.lang.String[]` | `list()` Returns a list of the directories in the jar.
`StreamImpl` | `openReadImpl()`
`java.lang.String` | `toString()`

Methods inherited from class com.caucho.vfs.FilesystemPath
`bind, copy, createRoot, equals, getFullPath, getParent, getPath, getTail, getUserPath, normalizePath, normalizePath, schemeWalk, setUserPath`

Methods inherited from class com.caucho.vfs.Path
`createNewFile, createRoot, createTempFile, getAttribute, getAttributeNames, getContentType, getHost, getNativePath, getObject, getPort, getQuery, getResources, getResources, getValue, isObject, iterator, lookup, lookup, lookupNative, lookupNative, mkdir, mkdirs, openAppend, openAppendImpl, openRead, openReadWrite, openReadWrite, openReadWriteImpl, 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`

Constructor Detail

### JarPath

    protected JarPath(FilesystemPath root,
                      java.lang.String userPath,
                      java.lang.String path,
                      Path backing)

  Creates a new jar path for the specific file
  Parameters:
    `root` - the root of this jar
    `userPath` - the path specified by the user in the lookup()
    `path` - the normalized path
    `jarFile` - the underlying jar

### JarPath

    public JarPath(Path backing)

Method Detail

### fsWalk

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

  Description copied from class: `FilesystemPath`
  Lookup a path relative to the current filesystem's root. Filesystems will specialize fsWalk.
  Overrides:
    `fsWalk` in class `FilesystemPath`
  Following copied from class: `com.caucho.vfs.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()

  Returns the scheme (jar)
  Overrides:
    `getScheme` in class `Path`

### getURL

    public java.lang.String getURL()

  Returns the full url.

  jar:!/entry-path

  Overrides:
    `getURL` in class `FilesystemPath`

### getContainer

    public Path getContainer()

  Returns the underlying file below the jar.

### exists

    public boolean exists()

  Returns true if the entry exists in the jar file.
  Overrides:
    `exists` in class `Path`

### isDirectory

    public boolean isDirectory()

  Returns true if the entry is a directory in the jar file.
  Overrides:
    `isDirectory` in class `Path`

### isFile

    public boolean isFile()

  Returns true if the entry is a file in the jar file.
  Overrides:
    `isFile` in class `Path`

### getLength

    public long getLength()

  Description copied from class: `Path`
  Returns the length of the file in bytes.
  Overrides:
    `getLength` in class `Path`
  Following copied from class: `com.caucho.vfs.Path`
  Returns:
    0 for non-files

### getLastModified

    public long getLastModified()

  Description copied from class: `Path`
  Returns the last modified time of the file. According to the jdk, this may not correspond to the system time.
  Overrides:
    `getLastModified` in class `Path`
  Following copied from class: `com.caucho.vfs.Path`
  Returns:
    0 for non-files.

### canRead

    public boolean canRead()

  Description copied from class: `Path`
  Tests if the file can be read.
  Overrides:
    `canRead` in class `Path`

### canWrite

    public boolean canWrite()

  Description copied from class: `Path`
  Tests if the file can be written.
  Overrides:
    `canWrite` in class `Path`

### list

    public java.lang.String[] list()
                            throws java.io.IOException

  Returns a list of the directories in the jar.
  Overrides:
    `list` in class `Path`
  Following copied from class: `com.caucho.vfs.Path`
  Returns:
    The contents of this directory or null if the path does not refer to a directory.

### openReadImpl

    public StreamImpl openReadImpl()
                            throws java.io.IOException

  Overrides:
    `openReadImpl` in class `Path`

### getJar

    protected com.caucho.vfs.Jar getJar()

### 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