DirectoryWalker.CancelException (Commons IO 2.5)
Date: 2016-12-01

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:
    java.io.Serializable
  Enclosing class:
    DirectoryWalker<T>

      public static class DirectoryWalker.CancelException
      extends java.io.IOException

  CancelException is thrown in DirectoryWalker to cancel the current processing.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private int` | `depth` The file depth when the exception was thrown.
    `private java.io.File` | `file` The file being processed when the exception was thrown.
    `private static long` | `serialVersionUID` Serialization id.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DirectoryWalker.CancelException(java.io.File file, int depth)` Constructs a `CancelException` with the file and depth when cancellation occurred.
    `DirectoryWalker.CancelException(java.lang.String message, java.io.File file, int depth)` Constructs a `CancelException` with an appropriate message and the file and depth when cancellation occurred.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getDepth()` Return the depth when the operation was cancelled.
    `java.io.File` | `getFile()` Return the file when the operation was cancelled.

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### serialVersionUID

          private static final long serialVersionUID

      Serialization id.
      See Also:
        Constant Field Values

    - #### file

          private final java.io.File file

      The file being processed when the exception was thrown.

    - #### depth

          private final int depth

      The file depth when the exception was thrown.

  - ### Constructor Detail

    - #### DirectoryWalker.CancelException

          public DirectoryWalker.CancelException(java.io.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(java.lang.String message,
                                         java.io.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 java.io.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 (c) 2002-2016 Apache Software Foundation