Interface MPackageReaderType

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
MPackageReader

public interface MPackageReaderType extends AutoCloseable
A package being read.
  • Method Details

    • packageDeclaration

      MPackageDeclaration packageDeclaration()
      Returns:
      The package declaration
    • close

      void close() throws MException
      Specified by:
      close in interface AutoCloseable
      Throws:
      MException
    • readFile

      InputStream readFile(MFileName file) throws MException
      Parameters:
      file - The file
      Returns:
      A stream for the given file
      Throws:
      MException
    • checkHash

      void checkHash(MFileName file) throws MException
      Check the digest of the given file, raising an exception if it does not match what is in the package declaration.
      Parameters:
      file - The file
      Throws:
      MException - On errors
    • unpackInto

      void unpackInto(Path output) throws MException
      Unpack all files into the given output directory.
      Parameters:
      output - The output directory
      Throws:
      MException - On errors