Interface RepeatableContent

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
ContentSlice, ImmutableByteContent

public interface RepeatableContent extends AutoCloseable
Immutable, provider-independent source of repeatable operation content.

Every call to openStream() returns a new sequential reader positioned at the first byte. Implementations may be backed by files, object storage, databases or explicitly small immutable byte values. Callers own and must close each returned stream. Closing the content releases its implementation-owned resources but does not close streams already returned unless the implementation documents a stronger local rule.

The contract does not impose an aggregate content-size limit. Completion remains subject to available storage, I/O, technical representability and explicitly injected deployment policy. Content never carries key material or cryptographic provider authority.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Releases implementation-owned resources.
    Returns a stable, non-secret identifier for integrity and durable provenance.
    Returns the known aggregate length when cheaply and authoritatively available.
    Opens a new sequential reader.
  • Method Details

    • openStream

      InputStream openStream() throws IOException
      Opens a new sequential reader.
      Returns:
      newly opened content stream
      Throws:
      IOException - if the immutable content cannot be opened or its integrity cannot be established
    • length

      OptionalLong length()
      Returns the known aggregate length when cheaply and authoritatively available.
      Returns:
      non-negative length, or empty when the length is unknown
    • contentId

      String contentId()
      Returns a stable, non-secret identifier for integrity and durable provenance.

      The identifier is metadata, not authorization, and must not expose a temporary physical path.

      Returns:
      stable non-blank identifier
    • close

      void close() throws IOException
      Releases implementation-owned resources.
      Specified by:
      close in interface AutoCloseable
      Throws:
      IOException - if cleanup fails