• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2009,2010 Matthias Treydte <mt@waldheinz.de>
3  *
4  * This library is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser General Public License as published
6  * by the Free Software Foundation; either version 2.1 of the License, or
7  * (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
12  * License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this library; If not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 package de.waldheinz.fs;
20 
21 /**
22  * This exception is thrown when an attempt is made to write to a read-only
23  * {@link BlockDevice}, {@link FileSystem} or other file system object. This is
24  * an unchecked exception, as it should always be possible to query the object
25  * about it's read-only state using it's {@code isReadOnly()} method.
26  *
27  * @author Matthias Treydte &lt;waldheinz at gmail.com&gt;
28  * @see FileSystem#isReadOnly()
29  * @see BlockDevice#isReadOnly()
30  */
31 public final class ReadOnlyException extends RuntimeException {
32 
33     private final static long serialVersionUID = 1;
34 
35     /**
36      * Creates a new instance of {@code ReadOnlyException}.
37      *
38      */
ReadOnlyException()39     public ReadOnlyException() {
40         super("read-only");
41     }
42 }
43