com.caucho.vfs
Class StringPath

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

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

StringPath

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

schemeWalk

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
Parameters:
userPath - the user's lookup() path.
attributes - the attributes for the new path.
path - the lookup() path
offset - offset into newPath to start lookup.
Returns:
the found path

getURL

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

Overrides:
getURL in class Path

getScheme

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

Specified by:
getScheme in class Path

getPath

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

lookupImpl

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.

Overrides:
lookupImpl in 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

exists

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

Overrides:
exists in class Path

canRead

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

Overrides:
canRead in class Path

openReadImpl

public StreamImpl openReadImpl()
Overrides:
openReadImpl in class Path