KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > schlichtherle > io > archive > spi > OutputArchiveBusyException


1 /*
2  * ArchiveDriverBusyException.java
3  *
4  * Created on 7. Maerz 2006, 21:55
5  */

6 /*
7  * Copyright 2006 Schlichtherle IT Services
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */

21
22 package de.schlichtherle.io.archive.spi;
23
24 import de.schlichtherle.io.FileBusyException;
25
26 /**
27  * Thrown to indicate that the {@link OutputArchive#getOutputStream} method
28  * failed because the archive is already busy on output.
29  * This exception is guaranteed to be recoverable,
30  * meaning it must be possible to write the same entry again as soon as the
31  * archive is not busy on output anymore, unless another exceptional condition
32  * occurs.
33  *
34  * @author Christian Schlichtherle
35  * @version @version@
36  * @since TrueZIP 6.0
37  */

38 public class OutputArchiveBusyException extends FileBusyException {
39     
40     private final ArchiveEntry entry;
41
42     /**
43      * Constructs an instance of <code>ArchiveDriverBusyException</code> with
44      * the specified archive entry.
45      *
46      * @param entry The archive entry which was tried to write while
47      * its associated {@link OutputArchive} was busy.
48      */

49     public OutputArchiveBusyException(ArchiveEntry entry) {
50         this.entry = entry;
51     }
52     
53     public ArchiveEntry getEntry() {
54         return entry;
55     }
56 }
57
Popular Tags