com.caucho.vfs
Class ClasspathPath

java.lang.Object
  extended by com.caucho.vfs.Path
      extended by com.caucho.vfs.FilesystemPath
          extended by com.caucho.vfs.ClasspathPath
All Implemented Interfaces:
java.lang.Comparable<Path>

public class ClasspathPath
extends FilesystemPath

The classpath scheme.


Field Summary
protected static L10N L
           
 
Fields inherited from class com.caucho.vfs.FilesystemPath
_bindRoot, _pathname, _root, _userPath
 
Fields inherited from class com.caucho.vfs.Path
_pathSeparatorChar, _schemeMap, _separatorChar
 
Constructor Summary
ClasspathPath(FilesystemPath root, java.lang.String userPath, java.lang.String path)
          Creates a new classpath sub path.
 
Method Summary
 boolean canRead()
          Returns true if the file is readable.
 boolean exists()
          Returns true if the file exists.
 Path fsWalk(java.lang.String userPath, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String path)
          Lookup the actual path relative to the filesystem root.
 long getLength()
          Returns the length of the file in bytes.
 java.lang.String getScheme()
          Returns the scheme, http.
 boolean isDirectory()
          Returns the last modified time.
 boolean isFile()
          Returns true if the file exists.
 StreamImpl openReadImpl()
          Returns a read stream for a GET request.
 java.lang.String toString()
          Returns the string form of the http path.
 
Methods inherited from class com.caucho.vfs.FilesystemPath
bind, createRoot, equals, getFullPath, getParent, getPath, getRoot, getTail, getUserPath, hashCode, normalizePath, normalizePath, schemeWalk, setUserPath
 
Methods inherited from class com.caucho.vfs.Path
cacheCopy, canExecute, canWrite, changeGroup, changeGroup, changeOwner, changeOwner, chmod, clearStatusCache, compareTo, copy, createDepend, createLink, createNewFile, createRoot, createTempFile, escapeURL, getAttribute, getAttributeNames, getBlockCount, getBlockSize, getCache, getCertificates, getContentType, getCrc64, getCreateTime, getDevice, getDeviceId, getDiskSpaceFree, getDiskSpaceTotal, getFileSeparatorChar, getGroup, getHost, getInode, getLastAccessTime, getLastModified, getLastStatusChangeTime, getMode, getNativePath, getNewlineString, getNumberOfLinks, getObject, getOwner, getPathSeparatorChar, getPort, getQuery, getRelativePath, getResources, getResources, getSchemeMap, getSeparatorChar, getURL, getUser, getUserDir, getValue, isBlockDevice, isCharacterDevice, isExecutable, isFIFO, isHardLink, isLink, isObject, isPathCacheable, isSocket, isSymbolicLink, isWindows, isWindowsInsecure, iterator, list, lookup, lookup, lookup, lookupImpl, lookupNative, lookupNative, lookupRelativeNativePath, mkdir, mkdirs, openAppend, openAppendImpl, openFileRandomAccess, openMemoryMappedFile, openRandomAccess, openRead, openReadWrite, openReadWrite, openReadWrite, openReadWriteImpl, openWrite, openWriteImpl, putCache, readLink, realPath, remove, removeAll, renameTo, renameTo, scanScheme, setDefaultSchemeMap, setExecutable, setLastModified, setObject, setTestWindows, setValue, truncate, truncate, unbind, writeToStream, writeToStream
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

L

protected static L10N L
Constructor Detail

ClasspathPath

public ClasspathPath(FilesystemPath root,
                     java.lang.String userPath,
                     java.lang.String path)
Creates a new classpath sub path.

Parameters:
root - the classpath filesystem root
userPath - the argument to the calling lookup()
newAttributes - any attributes passed to http
path - the full normalized path
query - any query string
Method Detail

fsWalk

public Path fsWalk(java.lang.String userPath,
                   java.util.Map<java.lang.String,java.lang.Object> attributes,
                   java.lang.String path)
Lookup the actual path relative to the filesystem root.

Specified by:
fsWalk in class FilesystemPath
Parameters:
userPath - the user's path to lookup()
attributes - the user's attributes to lookup()
path - the normalized path
Returns:
the selected path

getScheme

public java.lang.String getScheme()
Returns the scheme, http.

Specified by:
getScheme in class Path

exists

public boolean exists()
Returns true if the file exists.

Overrides:
exists in class Path

isFile

public boolean isFile()
Returns true if the file exists.

Overrides:
isFile in class Path

canRead

public boolean canRead()
Returns true if the file is readable.

Overrides:
canRead in class Path

isDirectory

public boolean isDirectory()
Returns the last modified time.

Overrides:
isDirectory 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
Returns:
0 for non-files

openReadImpl

public StreamImpl openReadImpl()
                        throws java.io.IOException
Returns a read stream for a GET request.

Overrides:
openReadImpl in class Path
Throws:
java.io.IOException

toString

public java.lang.String toString()
Returns the string form of the http path.

Overrides:
toString in class Path