KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > schlichtherle > io > FileFactory


1 /*
2  * FileFactory.java
3  *
4  * Created on 25. Februar 2006, 18: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;
23
24 import java.io.FileNotFoundException JavaDoc;
25 import java.net.URI JavaDoc;
26
27 /**
28  * A factory interface which creates {@link File}s, {@link FileInputStream}s
29  * and {@link FileOutputStream}s - it is not intended for public use!
30  * This interface is solely used to hide the existence of
31  * {@link ArchiveDetector}s from some methods in {@link File}.
32  * You should not implement this interface directly - implement
33  * {@link ArchiveDetector} instead.
34  * <p>
35  * Implementations must be virtually immutable and thread safe!
36  *
37  * @see ArchiveDetector
38  *
39  * @author Christian Schlichtherle
40  * @version @version@
41  * @since TrueZIP 6.0
42  */

43 public interface FileFactory {
44
45     File createFile(java.io.File JavaDoc blueprint);
46
47     File createFile(java.io.File JavaDoc delegate, File innerArchive);
48
49     File createFile(File blueprint, java.io.File JavaDoc delegate, File enclArchive);
50
51     File createFile(String JavaDoc pathName);
52
53     File createFile(String JavaDoc parent, String JavaDoc child);
54
55     File createFile(java.io.File JavaDoc parent, String JavaDoc child);
56
57     File createFile(URI JavaDoc uri);
58
59     FileInputStream createFileInputStream(java.io.File JavaDoc file)
60     throws FileNotFoundException JavaDoc;
61
62     FileOutputStream createFileOutputStream(java.io.File JavaDoc file, boolean append)
63     throws FileNotFoundException JavaDoc;
64 }
65
Popular Tags