Interface DataSource
-
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
net.sourceforge.pmd.util.datasource.internal.AbstractDataSource
,FileDataSource
,ReaderDataSource
,ZipDataSource
public interface DataSource extends Closeable
Represents a source file to be analyzed. Different implementations can get the source file from different places: the filesystem, a zip or jar file, etc.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description InputStream
getInputStream()
Get an InputStream on the source file.String
getNiceFileName(boolean shortNames, String inputFileName)
Return a nice version of the filename.
-
-
-
Method Detail
-
getInputStream
InputStream getInputStream() throws IOException
Get an InputStream on the source file.- Returns:
- the InputStream reading the source file
- Throws:
IOException
- if the file can't be opened
-
-