Interface MPackageReaderType
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
MPackageReader
A package being read.
-
Method Summary
Modifier and TypeMethodDescriptionvoidCheck the digest of the given file, raising an exception if it does not match what is in the package declaration.voidclose()voidunpackInto(Path output) Unpack all files into the given output directory.
-
Method Details
-
packageDeclaration
MPackageDeclaration packageDeclaration()- Returns:
- The package declaration
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
MException
-
readFile
- Parameters:
file- The file- Returns:
- A stream for the given file
- Throws:
MException
-
checkHash
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
Unpack all files into the given output directory.- Parameters:
output- The output directory- Throws:
MException- On errors
-