Class StringPath

  extended by com.caucho.vfs.Path
      extended by com.caucho.vfs.StringPath
All Implemented Interfaces:

public class StringPath
extends Path

Field Summary
Fields inherited from class com.caucho.vfs.Path
_pathSeparatorChar, _schemeMap, _separatorChar, L
Constructor Summary
StringPath(java.lang.String string)
Method Summary
 boolean canRead()
          Tests if the file can be read.
 boolean exists()
          Tests if the file exists.
 java.lang.String getPath()
          Returns the path.
 java.lang.String getScheme()
          Returns the url scheme
 java.lang.String getURL()
          Returns the full url for the given path.
 Path lookupImpl(java.lang.String userPath, java.util.Map<java.lang.String,java.lang.Object> newAttributes)
          Returns a new path relative to the current one.
 StreamImpl openReadImpl()
 Path schemeWalk(java.lang.String userPath, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String path, int offset)
          Path-specific lookup.
Methods inherited from class com.caucho.vfs.Path
bind, cacheCopy, canExecute, canWrite, changeGroup, changeGroup, changeOwner, changeOwner, chmod, clearStatusCache, compareTo, copy, createDepend, createLink, createNewFile, createRoot, createRoot, createTempFile, equals, escapeURL, getAttribute, getAttributeNames, getBlockCount, getBlockSize, getCache, getCertificates, getContentType, getCrc64, getCreateTime, getDevice, getDeviceId, getDiskSpaceFree, getDiskSpaceTotal, getFileSeparatorChar, getFullPath, getGroup, getHost, getInode, getLastAccessTime, getLastModified, getLastStatusChangeTime, getLength, getMode, getNativePath, getNewlineString, getNumberOfLinks, getObject, getOwner, getParent, getPathSeparatorChar, getPort, getQuery, getRelativePath, getResources, getResources, getSchemeMap, getSeparatorChar, getTail, getUser, getUserDir, getUserPath, getValue, hashCode, isBlockDevice, isCharacterDevice, isDirectory, isExecutable, isFIFO, isFile, isHardLink, isLink, isObject, isPathCacheable, isSocket, isSymbolicLink, isWindows, isWindowsInsecure, iterator, list, lookup, lookup, lookup, 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, setUserPath, setValue, toString, truncate, truncate, unbind, writeToStream, writeToStream
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail


public StringPath(java.lang.String string)
Method Detail


public Path schemeWalk(java.lang.String userPath,
                       java.util.Map<java.lang.String,java.lang.Object> attributes,
                       java.lang.String path,
                       int offset)
Description copied from class: Path
Path-specific lookup. Path implementations will override this.

Specified by:
schemeWalk in class Path
userPath - the user's lookup() path.
attributes - the attributes for the new path.
path - the lookup() path
offset - offset into newPath to start lookup.
the found path


public java.lang.String getURL()
Description copied from class: Path
Returns the full url for the given path.

getURL in class Path


public java.lang.String getScheme()
Description copied from class: Path
Returns the url scheme

Specified by:
getScheme in class Path


public java.lang.String getPath()
Description copied from class: Path
Returns the path. e.g. for HTTP, returns the part after the host and port.

Specified by:
getPath in class Path


public Path lookupImpl(java.lang.String userPath,
                       java.util.Map<java.lang.String,java.lang.Object> 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.

lookupImpl in class Path
userPath - relative or absolute path, essentially any url.
newAttributes - attributes for the new path.
the new path or null if the scheme doesn't exist


public boolean exists()
Description copied from class: Path
Tests if the file exists.

exists in class Path


public boolean canRead()
Description copied from class: Path
Tests if the file can be read.

canRead in class Path


public StreamImpl openReadImpl()
openReadImpl in class Path