1e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera/* 2e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * Copyright (c) 2007, 2009, Oracle and/or its affiliates. All rights reserved. 3e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * 5e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * This code is free software; you can redistribute it and/or modify it 6e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * under the terms of the GNU General Public License version 2 only, as 7e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * published by the Free Software Foundation. Oracle designates this 8e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * particular file as subject to the "Classpath" exception as provided 9e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * by Oracle in the LICENSE file that accompanied this code. 10e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * 11e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * This code is distributed in the hope that it will be useful, but WITHOUT 12e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * version 2 for more details (a copy is included in the LICENSE file that 15e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * accompanied this code). 16e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * 17e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * You should have received a copy of the GNU General Public License version 18e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * 2 along with this work; if not, write to the Free Software Foundation, 19e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * 21e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * or visit www.oracle.com if you need additional information or have any 23e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * questions. 24e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera */ 25e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera 26e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmerapackage java.nio.file; 27e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera 28e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera/** 29e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * Checked exception thrown when a file system operation is denied, typically 30e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * due to a file permission or other access check. 31e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * 32e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * <p> This exception is not related to the {@link 33e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * java.security.AccessControlException AccessControlException} or {@link 34e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * SecurityException} thrown by access controllers or security managers when 35e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * access to a file is denied. 36e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * 37e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * @since 1.7 38e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera */ 39e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera 40e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmerapublic class AccessDeniedException 41e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera extends FileSystemException 42e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera{ 43e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera private static final long serialVersionUID = 4943049599949219617L; 44e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera 45e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera /** 46e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * Constructs an instance of this class. 47e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * 48e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * @param file 49e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * a string identifying the file or {@code null} if not known 50e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera */ 51e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera public AccessDeniedException(String file) { 52e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera super(file); 53e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera } 54e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera 55e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera /** 56e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * Constructs an instance of this class. 57e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * 58e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * @param file 59e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * a string identifying the file or {@code null} if not known 60e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * @param other 61e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * a string identifying the other file or {@code null} if not known 62e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * @param reason 63e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera * a reason message with additional information or {@code null} 64e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera */ 65e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera public AccessDeniedException(String file, String other, String reason) { 66e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera super(file, other, reason); 67e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera } 68e6bac4bf9c85c2454ce22c91da6c654552c268e0Shubham Ajmera} 69