Class JarBinFile

java.lang.Object
dxt.scanpath.v2.io.JarBinFile
All Implemented Interfaces:
BinFile

public class JarBinFile extends Object implements BinFile
Represents a class-file entry within a JAR archive.
Author:
indroneel
  • Constructor Details

    • JarBinFile

      public JarBinFile(JarFile root, JarEntry entry)
      Creates a representation of a JAR class-file entry.
      Parameters:
      root - the containing JAR file
      entry - the class-file entry
  • Method Details

    • getClassName

      public String getClassName()
      Returns the fully qualified class name derived from the archive entry name.
      Specified by:
      getClassName in interface BinFile
      Returns:
      the fully qualified class name
    • getSimpleClassName

      public String getSimpleClassName()
      Returns the class name without package information.
      Specified by:
      getSimpleClassName in interface BinFile
      Returns:
      the simple class name
    • getContent

      public byte[] getContent() throws IOException
      Reads the class-file contents from the JAR archive.
      Specified by:
      getContent in interface BinFile
      Returns:
      the class-file contents
      Throws:
      IOException - if the entry cannot be read
    • toString

      public String toString()
      Returns the archive path and entry path identifying this class file.
      Overrides:
      toString in class Object
      Returns:
      the JAR entry location