org.millscript.commons.vfs.util
Class ChrootVolume

java.lang.Object
  extended by org.millscript.commons.vfs.util.ChrootVolume
All Implemented Interfaces:
VVolume

public class ChrootVolume
extends java.lang.Object
implements VVolume

This class implements a Unix style chroot volume, which can have its real root at any virtual folder.


Constructor Summary
ChrootVolume(VFolder root)
          Constructs a new chroot volume with the specified folder as its root.
 
Method Summary
 java.lang.StringBuffer appendBaseURI(java.lang.StringBuffer buffer)
          Appends the base URI of this volume to the specified string buffer.
 VFS getParentVFS()
          Returns the parent VFS, that which created this URI scheme handler.
 VFolder getRootVFolder()
          Returns the root VFolder for this virtual volume.
 java.net.URI getURI()
          Returns the URI for the root of this virtual filesystem volume.
 ChrootFolder makeRootVFolder(VFolder parent)
          Constructs the root folder for this volume, with the specified parent folder and returns it.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChrootVolume

public ChrootVolume(VFolder root)
Constructs a new chroot volume with the specified folder as its root.

Parameters:
root - the root folder for the chroot volume
Method Detail

appendBaseURI

public java.lang.StringBuffer appendBaseURI(java.lang.StringBuffer buffer)
Description copied from interface: VVolume
Appends the base URI of this volume to the specified string buffer. The base URI is considered to be the scheme, host and port of this volumes URI and possibly a few segments of a path.

Specified by:
appendBaseURI in interface VVolume
Parameters:
buffer - the string buffer to append the base URI to
Returns:
the specified StringBuffer with this volumes base URI appended to it
See Also:
VVolume.appendBaseURI(java.lang.StringBuffer)

getRootVFolder

public VFolder getRootVFolder()
Description copied from interface: VVolume
Returns the root VFolder for this virtual volume.

Specified by:
getRootVFolder in interface VVolume
Returns:
the VFolder for the root of this volume
See Also:
VVolume.getRootVFolder()

getURI

public java.net.URI getURI()
Description copied from interface: VVolume
Returns the URI for the root of this virtual filesystem volume.

Specified by:
getURI in interface VVolume
Returns:
a URI for this volume
See Also:
VVolume.getURI()

makeRootVFolder

public ChrootFolder makeRootVFolder(VFolder parent)
Constructs the root folder for this volume, with the specified parent folder and returns it.

Parameters:
parent - the virtual folder for the source of this volume
Returns:
the VFolder for the root of this volume

getParentVFS

public VFS getParentVFS()
Description copied from interface: VVolume
Returns the parent VFS, that which created this URI scheme handler. The parent VFS is maintained through to each volume, so that we can use it for configuration.

Specified by:
getParentVFS in interface VVolume
Returns:
See Also:
VVolume.getParentVFS()

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()


Copyright © 2005-2007 Open World Ltd. All Rights Reserved.