org.apache.commons.io
Class DirectoryWalker.CancelException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.io.IOException
              extended by org.apache.commons.io.DirectoryWalker.CancelException
All Implemented Interfaces:
Serializable
Enclosing class:
DirectoryWalker

public static class DirectoryWalker.CancelException
extends IOException

CancelException is thrown in DirectoryWalker to cancel the current processing.

See Also:
Serialized Form

Constructor Summary
DirectoryWalker.CancelException(File file, int depth)
          Constructs a CancelException with the file and depth when cancellation occurred.
DirectoryWalker.CancelException(String message, File file, int depth)
          Constructs a CancelException with an appropriate message and the file and depth when cancellation occurred.
 
Method Summary
 int getDepth()
          Return the depth when the operation was cancelled.
 File getFile()
          Return the file when the operation was cancelled.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DirectoryWalker.CancelException

public DirectoryWalker.CancelException(File file,
                                       int depth)
Constructs a CancelException with the file and depth when cancellation occurred.

Parameters:
file - the file when the operation was cancelled, may be null
depth - the depth when the operation was cancelled, may be null

DirectoryWalker.CancelException

public DirectoryWalker.CancelException(String message,
                                       File file,
                                       int depth)
Constructs a CancelException with an appropriate message and the file and depth when cancellation occurred.

Parameters:
message - the detail message
file - the file when the operation was cancelled
depth - the depth when the operation was cancelled
Method Detail

getFile

public File getFile()
Return the file when the operation was cancelled.

Returns:
the file when the operation was cancelled

getDepth

public int getDepth()
Return the depth when the operation was cancelled.

Returns:
the depth when the operation was cancelled


Copyright © 2002-2008 The Apache Software Foundation. All Rights Reserved.