KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sourceforge > pmd > DataSource


1 /**
2  * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3  */

4 package net.sourceforge.pmd;
5
6 import java.io.IOException JavaDoc;
7 import java.io.InputStream JavaDoc;
8
9 /**
10  * Represents a source file to be analyzed.
11  * Different implementations can get the source file
12  * from different places: the filesystem, a zip or jar file, etc.
13  */

14 public interface DataSource {
15     /**
16      * Get an InputStream on the source file.
17      *
18      * @return the InputStream reading the source file
19      * @throws IOException if the file can't be opened
20      */

21     public InputStream JavaDoc getInputStream() throws IOException JavaDoc;
22
23     /**
24      * Return a nice version of the filename.
25      *
26      * @param shortNames true if short names are being used
27      * @param inputFileName name of a "master" file this file is relative to
28      * @return String
29      */

30     public String JavaDoc getNiceFileName(boolean shortNames, String JavaDoc inputFileName);
31 }
32
Popular Tags