Interface DataSource

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable
    All Known Implementing Classes:
    AbstractDataSource, FileDataSource, ReaderDataSource, ZipDataSource

    public interface DataSource
    extends java.io.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
      java.io.InputStream getInputStream()
      Get an InputStream on the source file.
      java.lang.String getNiceFileName​(boolean shortNames, java.lang.String inputFileName)
      Return a nice version of the filename.
      • Methods inherited from interface java.io.Closeable

        close
    • Method Detail

      • getInputStream

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

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