# Class CLN2FileReadable

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

All Implemented Interfaces:
  `CLNFileReadableType, AutoCloseable`

public final class CLN2FileReadable extends Object implements CLNFileReadableType
The main readable file implementation.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CLN2FileReadable(CLNDecompressorFactoryType inDecompressors, com.io7m.jbssio.api.BSSReaderRandomAccessType inBaseReader, com.io7m.entomos.core.EoFileReaderType inReader, CLNParseRequest inRequest)`
  The main readable file implementation.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `CLNSectionReadableType`
  `openSection(com.io7m.entomos.core.EoFileSection description)`
  Open a section for reading.
  `NavigableSet<com.io7m.entomos.core.EoFileSection>`
  `sections()`
  `long`
  `trailingOctets()`
  Obtain the number of trailing octets in the file.
  `CLNVersion`
  `version()`

  ### Methods inherited from class Object

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

  ### Methods inherited from interface CLNFileReadableType

  `openEnd, openImage2D, openImageArray, openImageCube, openImageInfo, openMetadata`

- ## Constructor Details

  - ### CLN2FileReadable

    public CLN2FileReadable(CLNDecompressorFactoryType inDecompressors, com.io7m.jbssio.api.BSSReaderRandomAccessType inBaseReader, com.io7m.entomos.core.EoFileReaderType inReader, CLNParseRequest inRequest)
    The main readable file implementation.
    Parameters:
      `inDecompressors` - The decompressors
      `inBaseReader` - The base reader
      `inReader` - The reader
      `inRequest` - The parse request

- ## Method Details

  - ### sections

    public NavigableSet<com.io7m.entomos.core.EoFileSection> sections()
    Specified by:
      `sections` in interface `CLNFileReadableType`
    Returns:
      The list of sections in the file

  - ### version

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

  - ### openSection

    public CLNSectionReadableType openSection(com.io7m.entomos.core.EoFileSection description)
    Description copied from interface: `CLNFileReadableType`
    Open a section for reading.
    Specified by:
      `openSection` in interface `CLNFileReadableType`
    Parameters:
      `description` - The section description
    Returns:
      A readable section

  - ### trailingOctets

    public long trailingOctets()
    Description copied from interface: `CLNFileReadableType`
    Obtain the number of trailing octets in the file. This value should always be zero for valid files.
    Specified by:
      `trailingOctets` in interface `CLNFileReadableType`
    Returns:
      The number of trailing octets

  - ### close

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