Interface MPackageReaderType
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
MPackageReader
A package being read.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThe policy for platform-dependent modules. -
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()default voidunpackInto(Path output) Unpack all files into the given output directory.voidunpackInto(Path output, Function<MPlatformDependentModule, MPackageReaderType.PlatformDependentModulePolicy> filterPlatform) 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- On errors
-
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
-
unpackInto
void unpackInto(Path output, Function<MPlatformDependentModule, MPackageReaderType.PlatformDependentModulePolicy> filterPlatform) throws MException Unpack all files into the given output directory.- Parameters:
output- The output directoryfilterPlatform- The filter for platform-dependent modules- Throws:
MException- On errors
-