# Interface CAFileType

All Superinterfaces:
  `Comparable<CAFileType>`

All Known Implementing Classes:
  `CAFileType.CAFileWithData, CAFileType.CAFileWithoutData`

public sealed interface CAFileType extends Comparable<CAFileType> permits CAFileType.CAFileWithoutData, CAFileType.CAFileWithData
The type of files.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Interface
  Description
  `static final record`
  `CAFileType.CAFileWithData`
  A file with data.
  `static final record`
  `CAFileType.CAFileWithoutData`
  A file without data.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `default int`
  `compareTo(CAFileType other)`
  `Optional<CAByteArray>`
  `dataOptional()`
  `String`
  `description()`
  `String`
  `hashAlgorithm()`
  `String`
  `hashValue()`
  `CAFileID`
  `id()`
  `String`
  `mediaType()`
  `long`
  `size()`
  `CAFileType.CAFileWithoutData`
  `withoutData()`

- ## Method Details

  - ### id

    CAFileID id()
    Returns:
      The ID

  - ### description

    String description()
    Returns:
      The description

  - ### mediaType

    String mediaType()
    Returns:
      The media type

  - ### size

    long size()
    Returns:
      The size in bytes

  - ### hashAlgorithm

    String hashAlgorithm()
    Returns:
      The hash algorithm

  - ### hashValue

    String hashValue()
    Returns:
      The hash value

  - ### dataOptional

    Optional<CAByteArray> dataOptional()
    Returns:
      The data, if any

  - ### withoutData

    CAFileType.CAFileWithoutData withoutData()
    Returns:
      The file without data

  - ### compareTo

    default int compareTo(CAFileType other)
    Specified by:
      `compareTo` in interface `Comparable<CAFileType>`