com.caucho.vfs
Class SpyPath

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

public class SpyPath
extends PathWrapper

Logs usage of the path.


Field Summary
protected static java.util.logging.Logger log
           
 
Fields inherited from class com.caucho.vfs.PathWrapper
L
 
Fields inherited from class com.caucho.vfs.Path
_pathSeparatorChar, _schemeMap, _separatorChar
 
Constructor Summary
SpyPath(Path path)
          Creates a new Path object.
 
Method Summary
 Path lookup(java.lang.String userPath, java.util.Map<java.lang.String,java.lang.Object> newAttributes)
          Returns a new path relative to the current one.
 RandomAccessStream openRandomAccess()
          Opens a random-access stream.
 
Methods inherited from class com.caucho.vfs.PathWrapper
bind, canRead, canWrite, changeGroup, changeGroup, changeOwner, changeOwner, chmod, createNewFile, createRoot, createRoot, createTempFile, equals, exists, getAttribute, getAttributeNames, getContentType, getCrc64, getCreateTime, getDiskSpaceFree, getDiskSpaceTotal, getFullPath, getGroup, getHost, getInode, getLastAccessTime, getLastModified, getLength, getNativePath, getObject, getOwner, getParent, getPath, getPort, getQuery, getRelativePath, getResources, getResources, getScheme, getTail, getURL, getUserPath, getValue, getWrappedPath, hashCode, isDirectory, isExecutable, isFile, isObject, iterator, list, lookupImpl, lookupNative, mkdir, mkdirs, openAppend, openAppendImpl, openReadImpl, openReadWrite, openReadWrite, openReadWriteImpl, openWriteImpl, remove, removeAll, renameTo, schemeWalk, setExecutable, setLastModified, setObject, setUserPath, setValue, toString, unbind, writeToStream, writeToStream
 
Methods inherited from class com.caucho.vfs.Path
cacheCopy, canExecute, clearStatusCache, compareTo, copy, createDepend, createLink, escapeURL, getBlockCount, getBlockSize, getCache, getCertificates, getDevice, getDeviceId, getFileSeparatorChar, getLastStatusChangeTime, getMode, getNewlineString, getNumberOfLinks, getPathSeparatorChar, getSchemeMap, getSeparatorChar, getUser, getUserDir, isBlockDevice, isCharacterDevice, isFIFO, isHardLink, isLink, isPathCacheable, isSocket, isSymbolicLink, isWindows, isWindowsInsecure, lookup, lookup, lookupNative, lookupRelativeNativePath, openFileRandomAccess, openMemoryMappedFile, openRead, openReadWrite, openWrite, putCache, readLink, realPath, renameTo, scanScheme, setDefaultSchemeMap, setTestWindows, truncate, truncate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static final java.util.logging.Logger log
Constructor Detail

SpyPath

public SpyPath(Path path)
Creates a new Path object.

Parameters:
root - the new Path root.
Method Detail

lookup

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

openRandomAccess

public RandomAccessStream openRandomAccess()
                                    throws java.io.IOException
Opens a random-access stream.

Overrides:
openRandomAccess in class PathWrapper
Throws:
java.io.IOException