Class DiskBinFile

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

public class DiskBinFile extends Object implements BinFile
Represents a local filesystem class file.
Author:
indroneel
  • Constructor Details

    • DiskBinFile

      public DiskBinFile(File root, File file)
      Creates a representation of a class file relative to a filesystem root.
      Parameters:
      root - the root directory containing the class file
      file - the class file
  • Method Details

    • getClassName

      public String getClassName()
      Returns the class name derived from the file's path relative to the root directory.
      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 local filesystem.
      Specified by:
      getContent in interface BinFile
      Returns:
      the class-file contents
      Throws:
      IOException - if the file cannot be read