< prev index next >

src/java.base/share/classes/java/nio/file/attribute/UserPrincipalNotFoundException.java

Print this page




  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package java.nio.file.attribute;
  27 
  28 import java.io.IOException;
  29 
  30 /**
  31  * Checked exception thrown when a lookup of {@link UserPrincipal} fails because
  32  * the principal does not exist.
  33  *
  34  * @since 1.7
  35  */
  36 
  37 public class UserPrincipalNotFoundException
  38     extends IOException
  39 {

  40     static final long serialVersionUID = -5369283889045833024L;
  41 
  42     private final String name;
  43 
  44     /**
  45      * Constructs an instance of this class.
  46      *
  47      * @param   name
  48      *          the principal name; may be {@code null}
  49      */
  50     public UserPrincipalNotFoundException(String name) {
  51         super();
  52         this.name = name;
  53     }
  54 
  55     /**
  56      * Returns the user principal name if this exception was created with the
  57      * user principal name that was not found, otherwise {@code null}.
  58      *
  59      * @return  the user principal name or {@code null}


  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package java.nio.file.attribute;
  27 
  28 import java.io.IOException;
  29 
  30 /**
  31  * Checked exception thrown when a lookup of {@link UserPrincipal} fails because
  32  * the principal does not exist.
  33  *
  34  * @since 1.7
  35  */
  36 
  37 public class UserPrincipalNotFoundException
  38     extends IOException
  39 {
  40     @java.io.Serial
  41     static final long serialVersionUID = -5369283889045833024L;
  42 
  43     private final String name;
  44 
  45     /**
  46      * Constructs an instance of this class.
  47      *
  48      * @param   name
  49      *          the principal name; may be {@code null}
  50      */
  51     public UserPrincipalNotFoundException(String name) {
  52         super();
  53         this.name = name;
  54     }
  55 
  56     /**
  57      * Returns the user principal name if this exception was created with the
  58      * user principal name that was not found, otherwise {@code null}.
  59      *
  60      * @return  the user principal name or {@code null}
< prev index next >