# Class CLN2FileWritable

java.lang.Object
com.io7m.calino.vanilla.internal.CLN2FileWritable

All Implemented Interfaces:
  `CLNFileWritableType, AutoCloseable`

public final class CLN2FileWritable extends Object implements CLNFileWritableType
The main writable file implementation.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `CLNSectionWritableType`
  `createSection(long identifier)`
  Create a new section with the given identifier.
  `List<CLNFileSectionDescription>`
  `sections()`
  `void`
  `start()`
  Start the section.
  `CLNVersion`
  `version()`

  ### Methods inherited from class Object

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

  ### Methods inherited from interface CLNFileWritableType

  `createSectionEnd, createSectionImage2D, createSectionImageArray, createSectionImageCube, createSectionImageInfo, createSectionMetadata`

- ## Method Details

  - ### sections

    public List<CLNFileSectionDescription> sections() throws IOException
    Specified by:
      `sections` in interface `CLNFileWritableType`
    Returns:
      The sections currently declared within the file
    Throws:
      `IOException` - On errors

  - ### version

    public CLNVersion version()
    Specified by:
      `version` in interface `CLNFileWritableType`
    Returns:
      The file version

  - ### createSection

    public CLNSectionWritableType createSection(long identifier) throws IOException
    Description copied from interface: `CLNFileWritableType`
    Create a new section with the given identifier.
    Specified by:
      `createSection` in interface `CLNFileWritableType`
    Parameters:
      `identifier` - The identifier
    Returns:
      A new section
    Throws:
      `IOException` - On errors

  - ### close

    public void close() throws CLNException
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `CLNFileWritableType`
    Throws:
      `CLNException`

  - ### start

    public void start() throws com.io7m.seltzer.io.SIOException
    Start the section.
    Throws:
      `com.io7m.seltzer.io.SIOException` - On errors