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 Detail

      • getInputStream

        InputStream getInputStream()
                            throws IOException
        Get an InputStream on the source file.
        the InputStream reading the source file
        IOException - if the file can't be opened
      • getNiceFileName

        String getNiceFileName​(boolean shortNames,
                               String inputFileName)
        Return a nice version of the filename.
        shortNames - true if short names are being used
        inputFileName - name of a "master" file this file is relative to