Class ZipDataSource

  • All Implemented Interfaces:
    Closeable, AutoCloseable, DataSource

    @Deprecated
    public class ZipDataSource
    extends net.sourceforge.pmd.util.datasource.internal.AbstractDataSource
    Deprecated.
    DataSource implementation to read data from an entry in a zip or jar file.
    • Constructor Detail

      • ZipDataSource

        public ZipDataSource​(ZipFile zipFile,
                             ZipEntry zipEntry)
        Deprecated.
        Parameters:
        zipFile - the ZipFile
        zipEntry - the ZipEntry containing the file to read
    • Method Detail

      • getInputStream

        public InputStream getInputStream()
                                   throws IOException
        Deprecated.
        Description copied from interface: DataSource
        Get an InputStream on the source file.
        Returns:
        the InputStream reading the source file
        Throws:
        IOException - if the file can't be opened
      • getNiceFileName

        public String getNiceFileName​(boolean shortNames,
                                      String inputFileName)
        Deprecated.
        Description copied from interface: DataSource
        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
      • hashCode

        public int hashCode()
        Deprecated.
        Overrides:
        hashCode in class Object
      • equals

        public boolean equals​(Object obj)
        Deprecated.
        Overrides:
        equals in class Object