Interface PayloadProvider

All Known Implementing Classes:
PayloadRecorder.Finished

public interface PayloadProvider
  • Method Details

    • openChannel

      ReadableByteChannel openChannel() throws IOException
      Open a new channel to the payload data

      The caller is responsible for closing the resource

      Returns:
      the newly created channel
      Throws:
      IOException - if opening the channels fails
    • getPayloadSize

      long getPayloadSize() throws IOException
      The number of bytes of the compressed archive file
      Returns:
      the number of bytes of the compressed archive file
      Throws:
      IOException - if anything goes wrong
    • getArchiveSize

      long getArchiveSize() throws IOException
      Get the number of bytes of the uncompressed payload archive
      Returns:
      the number of bytes of the uncompressed payload archive
      Throws:
      IOException - if anything goes wrong
    • getPayloadCoding

      PayloadCoding getPayloadCoding()
      The compression method for this compressed archive file
      Returns:
      the compression method for this compressed archive file
    • getPayloadFlags

      Optional<String> getPayloadFlags()
      The compression flags for this compressed archive file, if any
      Returns:
      the compression flags for this compressed archive file, if any
    • getFileDigestAlgorithm

      DigestAlgorithm getFileDigestAlgorithm()
      The algorithm used for generating file checksum digests whose ordinal is defined in HashAlgorithmTags
      Returns:
      the algorithm used for generating file checksum digests whose ordinal is defined in HashAlgorithmTags
    • getAdditionalHeader

      default Header<RpmTag> getAdditionalHeader()
      Get additional header tags.

      An implementation must always return a new instance, but also every call must provide the same content.

      Returns:
      A new instance with the additional header entries. Possibly empty, but never null.