Package org.apache.commons.io
Class DirectoryWalker.CancelException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.apache.commons.io.DirectoryWalker.CancelException
- All Implemented Interfaces:
Serializable
- Enclosing class:
- DirectoryWalker<T>
CancelException is thrown in DirectoryWalker to cancel the current
processing.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe file depth when the exception was thrown.private final FileThe file being processed when the exception was thrown.private static final longSerialization id. -
Constructor Summary
ConstructorsConstructorDescriptionCancelException(File file, int depth) Constructs aDirectoryWalker.CancelExceptionwith the file and depth when cancellation occurred.CancelException(String message, File file, int depth) Constructs aDirectoryWalker.CancelExceptionwith an appropriate message and the file and depth when cancellation occurred. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization id.- See Also:
-
file
The file being processed when the exception was thrown. -
depth
private final int depthThe file depth when the exception was thrown.
-
-
Constructor Details
-
CancelException
Constructs aDirectoryWalker.CancelExceptionwith the file and depth when cancellation occurred.- Parameters:
file- the file when the operation was canceled, may be null.depth- the depth when the operation was canceled, may be null.
-
CancelException
Constructs aDirectoryWalker.CancelExceptionwith an appropriate message and the file and depth when cancellation occurred.- Parameters:
message- the detail message.file- the file when the operation was canceled.depth- the depth when the operation was canceled.
-
-
Method Details
-
getDepth
public int getDepth()Returns the depth when the operation was canceled.- Returns:
- the depth when the operation was canceled.
-
getFile
Returns the file when the operation was canceled.- Returns:
- the file when the operation was canceled.
-