# Class MPackageWriters

java.lang.Object
com.io7m.montarre.io.MPackageWriters

All Implemented Interfaces:
  `MPackageWriterFactoryType`

public final class MPackageWriters extends Object implements MPackageWriterFactoryType
Package writers.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MPackageWriters()`
  Package writers.
  `MPackageWriters(MPackageDeclarationSerializerFactoryType inSerializers)`
  Package writers.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `MPackageWriterType`
  `create(Path file, Path fileTmp, MPackageDeclaration packageV)`
  Start writing a new package.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### MPackageWriters

    public MPackageWriters()
    Package writers.

  - ### MPackageWriters

    public MPackageWriters(MPackageDeclarationSerializerFactoryType inSerializers)
    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: `MPackageWriterFactoryType`
    Start 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:
      `create` in interface `MPackageWriterFactoryType`
    Parameters:
      `file` - The output file
      `fileTmp` - The temporary output file
      `packageV` - The package declaration
    Returns:
      A new package writer
    Throws:
      `MException` - On errors