KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > avalon > excalibur > vfs > VFileAccessor


1 /*
2  * Copyright (C) The Apache Software Foundation. All rights reserved.
3  *
4  * This software is published under the terms of the Apache Software License
5  * version 1.1, a copy of which has been included with this distribution in
6  * the LICENSE.txt file.
7  */

8 package org.apache.avalon.excalibur.vfs;
9
10 import java.io.InputStream JavaDoc;
11 import java.io.IOException JavaDoc;
12
13 /**
14  * Accessor for implementations of VFS.
15  *
16  * @author <a HREF="mailto:peter@apache.org">Peter Donald</a>
17  */

18 public interface VFileAccessor
19 {
20     /**
21      * Get size of resource in bytes.
22      *
23      * @param resource the resource designator
24      * @return the size of resource in bytes
25      */

26     long getSize( VFile file, Object JavaDoc resource );
27
28     /**
29      * Get InputStream for resource.
30      *
31      * @param resource the resource designator
32      * @return the input stream
33      * @exception IOException if an error occurs
34      */

35     InputStream JavaDoc getInputStream( VFile file, Object JavaDoc resource )
36         throws IOException JavaDoc;
37 }
38
Popular Tags