KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > commons > vfs > cache > NullFilesCache


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

16 package org.apache.commons.vfs.cache;
17
18 import org.apache.commons.vfs.FileName;
19 import org.apache.commons.vfs.FileObject;
20 import org.apache.commons.vfs.FileSystem;
21
22 /**
23  * <p/>
24  * A {@link org.apache.commons.vfs.FilesCache} implementation.<br>
25  * This implementation never ever caches a single file.
26  * </p>
27  * <p/>
28  * <b>Notice: if you use resolveFile(uri) multiple times with the same path, the system will always create a new instance.
29  * Changes on one instance of this file are not seen by the others.</b>
30  * </p>
31  *
32  * @author <a HREF="mailto:imario@apache.org">Mario Ivankovits</a>
33  */

34 public class NullFilesCache extends AbstractFilesCache
35 {
36     public void putFile(final FileObject file)
37     {
38     }
39
40     public FileObject getFile(final FileSystem filesystem, final FileName name)
41     {
42         return null;
43     }
44
45     public void clear(FileSystem filesystem)
46     {
47     }
48
49     public void close()
50     {
51         super.close();
52     }
53
54     public void removeFile(FileSystem filesystem, FileName name)
55     {
56     }
57
58     public void touchFile(FileObject file)
59     {
60     }
61 }
62
Popular Tags