Class MPackageWriter
java.lang.Object
com.io7m.montarre.io.internal.MPackageWriter
- All Implemented Interfaces:
MPackageWriterType, AutoCloseable
The default package writer implementation.
-
Constructor Summary
ConstructorsConstructorDescriptionMPackageWriter(MPackageDeclarationSerializerFactoryType inSerializers, Path inArchiveFile, Path inArchiveFileTmp, MPackageDeclaration inPackageV) Construct a package writer. -
Method Summary
-
Constructor Details
-
MPackageWriter
public MPackageWriter(MPackageDeclarationSerializerFactoryType inSerializers, Path inArchiveFile, Path inArchiveFileTmp, MPackageDeclaration inPackageV) throws IOException Construct a package writer.- Parameters:
inSerializers- The serializersinArchiveFile- The archive fileinArchiveFileTmp- The temporary archive fileinPackageV- The package declaration- Throws:
IOException- On errors
-
-
Method Details
-
addFile
Description copied from interface:MPackageWriterTypeAdd a file to the package.- Specified by:
addFilein interfaceMPackageWriterType- Parameters:
name- The file namefile- The file- Throws:
MException- On errors
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceMPackageWriterType- Throws:
MException
-
packFrom
Description copied from interface:MPackageWriterTypePack all files in the given directory hierarchy.- Specified by:
packFromin interfaceMPackageWriterType- Parameters:
inputDirectory- The input directory- Throws:
MException
-
start
-