< prev index next >

src/java.base/share/classes/java/nio/file/AccessDeniedException.java

Print this page




  23  * questions.
  24  */
  25 
  26 package java.nio.file;
  27 
  28 /**
  29  * Checked exception thrown when a file system operation is denied, typically
  30  * due to a file permission or other access check.
  31  *
  32  * <p> This exception is not related to the {@link
  33  * java.security.AccessControlException AccessControlException} or {@link
  34  * SecurityException} thrown by access controllers or security managers when
  35  * access to a file is denied.
  36  *
  37  * @since 1.7
  38  */
  39 
  40 public class AccessDeniedException
  41     extends FileSystemException
  42 {

  43     private static final long serialVersionUID = 4943049599949219617L;
  44 
  45     /**
  46      * Constructs an instance of this class.
  47      *
  48      * @param   file
  49      *          a string identifying the file or {@code null} if not known
  50      */
  51     public AccessDeniedException(String file) {
  52         super(file);
  53     }
  54 
  55     /**
  56      * Constructs an instance of this class.
  57      *
  58      * @param   file
  59      *          a string identifying the file or {@code null} if not known
  60      * @param   other
  61      *          a string identifying the other file or {@code null} if not known
  62      * @param   reason


  23  * questions.
  24  */
  25 
  26 package java.nio.file;
  27 
  28 /**
  29  * Checked exception thrown when a file system operation is denied, typically
  30  * due to a file permission or other access check.
  31  *
  32  * <p> This exception is not related to the {@link
  33  * java.security.AccessControlException AccessControlException} or {@link
  34  * SecurityException} thrown by access controllers or security managers when
  35  * access to a file is denied.
  36  *
  37  * @since 1.7
  38  */
  39 
  40 public class AccessDeniedException
  41     extends FileSystemException
  42 {
  43     @java.io.Serial
  44     private static final long serialVersionUID = 4943049599949219617L;
  45 
  46     /**
  47      * Constructs an instance of this class.
  48      *
  49      * @param   file
  50      *          a string identifying the file or {@code null} if not known
  51      */
  52     public AccessDeniedException(String file) {
  53         super(file);
  54     }
  55 
  56     /**
  57      * Constructs an instance of this class.
  58      *
  59      * @param   file
  60      *          a string identifying the file or {@code null} if not known
  61      * @param   other
  62      *          a string identifying the other file or {@code null} if not known
  63      * @param   reason
< prev index next >