Class LicenseWriter

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public class LicenseWriter
    extends Object
    implements Closeable
    Write the license into the output. Use the constructors to create a writer object specifying the target for the license, and then use one of the 'write()' methods to perform writing specifying the format. The writing, being atomic in the sense that there is no possible way or reason to write anything more into the destination, closes the output. Nevertheless, the class contains a close() method that can be called.

    The class also implements the Closeable interface, thus it can be used in try-with-resources block to call the close() method.