Interface DataSource
-
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
net.sourceforge.pmd.util.datasource.internal.AbstractDataSource
,FileDataSource
,net.sourceforge.pmd.util.datasource.internal.PathDataSource
,ReaderDataSource
,ZipDataSource
@Deprecated public interface DataSource extends Closeable
Deprecated.UseTextFile
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 Static Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description static DataSource
forString(String sourceText, String fileName)
Deprecated.InputStream
getInputStream()
Deprecated.Get an InputStream on the source file.String
getNiceFileName(boolean shortNames, String inputFileName)
Deprecated.Return a nice version of the filename.
-
-
-
Method Detail
-
getInputStream
InputStream getInputStream() throws IOException
Deprecated.Get an InputStream on the source file.- Returns:
- the InputStream reading the source file
- Throws:
IOException
- if the file can't be opened
-
getNiceFileName
String getNiceFileName(boolean shortNames, String inputFileName)
Deprecated.Return a nice version of the filename.- Parameters:
shortNames
- true if short names are being usedinputFileName
- name of a "master" file this file is relative to- Returns:
- String
-
forString
static DataSource forString(String sourceText, String fileName)
Deprecated.
-
-