Class ZipBinFile

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

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

    • ZipBinFile

      public ZipBinFile(ZipFile root, ZipEntry entry)
      Creates a representation of a ZIP class-file entry.
      Parameters:
      root - the containing ZIP 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 ZIP 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 ZIP entry location