Class MPackageWriters
java.lang.Object
com.io7m.montarre.io.MPackageWriters
- All Implemented Interfaces:
MPackageWriterFactoryType
Package writers.
-
Constructor Summary
ConstructorsConstructorDescriptionPackage writers.MPackageWriters(MPackageDeclarationSerializerFactoryType inSerializers) Package writers. -
Method Summary
Modifier and TypeMethodDescriptioncreate(Path file, Path fileTmp, MPackageDeclaration packageV) Start writing a new package.
-
Constructor Details
-
MPackageWriters
public MPackageWriters()Package writers. -
MPackageWriters
Package writers.- Parameters:
inSerializers- A serializer factory
-
-
Method Details
-
create
public MPackageWriterType create(Path file, Path fileTmp, MPackageDeclaration packageV) throws MException Description copied from interface:MPackageWriterFactoryTypeStart writing a new package. When the package writer is closed, validation will be performed and, on success, the output file will be atomically renamed from the temporary file to the output file, replacing any existing file.- Specified by:
createin interfaceMPackageWriterFactoryType- Parameters:
file- The output filefileTmp- The temporary output filepackageV- The package declaration- Returns:
- A new package writer
- Throws:
MException- On errors
-