Class SingleFileCodeBaseEntry

  • All Implemented Interfaces:
    ICodeBaseEntry

    public class SingleFileCodeBaseEntry
    extends java.lang.Object
    implements ICodeBaseEntry
    Codebase entry for a single-file codebase.
    Author:
    David Hovemeyer
    • Constructor Detail

      • SingleFileCodeBaseEntry

        public SingleFileCodeBaseEntry​(SingleFileCodeBase codeBase)
        Constructor.
        Parameters:
        codeBase - parent codebase
    • Method Detail

      • getNumBytes

        public int getNumBytes()
        Description copied from interface: ICodeBaseEntry
        Get the number of bytes in the resource. Returns <0 if the number of bytes is not known.
        Specified by:
        getNumBytes in interface ICodeBaseEntry
        Returns:
        number of bytes in the resource, or <0 if not known.
      • getResourceName

        public java.lang.String getResourceName()
        Description copied from interface: ICodeBaseEntry
        Get the name of the resource.
        Specified by:
        getResourceName in interface ICodeBaseEntry
        Returns:
        the name of the resource
      • openResource

        public java.io.InputStream openResource()
                                         throws java.io.IOException
        Description copied from interface: ICodeBaseEntry
        Open an input stream reading from the resource.
        Specified by:
        openResource in interface ICodeBaseEntry
        Returns:
        InputStream reading from the resource.
        Throws:
        java.io.IOException - if an error occurs reading from the resource
      • getCodeBase

        public ICodeBase getCodeBase()
        Description copied from interface: ICodeBaseEntry
        Get the codebase this codebase entry belongs to.
        Specified by:
        getCodeBase in interface ICodeBaseEntry
        Returns:
        the codebase this codebase entry belongs to
      • overrideResourceName

        public void overrideResourceName​(java.lang.String resourceName)
        Description copied from interface: ICodeBaseEntry
        Override the resource name of this codebase entry.
        Specified by:
        overrideResourceName in interface ICodeBaseEntry
        Parameters:
        resourceName - the new resource name
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object