Package zeroecho.sdk.content.api


package zeroecho.sdk.content.api
Content abstractions for streaming data in the SDK.

This package defines the common DataContent contract used by SDK pipelines, plus marker interfaces that classify content as plain or encrypted, and an extended interface for exporting content in alternate formats. Implementations expose data via DataContent.getStream() and may participate in pipelines by accepting upstream input with DataContent.setInput(DataContent).

Key elements

Usage

Content is consumed as a stream and must be closed by the caller. For small payloads, helpers like DataContent.toBytes() and DataContent.toText() can be convenient, but streaming should be preferred for large data.

// Consume a DataContent instance and write it to an OutputStream.
zeroecho.sdk.content.api.DataContent content = ...obtained from a builder or pipeline ...;
try (java.io.InputStream in = content.getStream()) {
    in.transferTo(out);
}

Notes

Since:
1.0
  • Class
    Description
    An abstract base class for exportable data content, providing default implementations for managing input data and export mode.
    Represents a generic unit of data content.
    Represents encrypted content, which is the result of an encryption process and can be safely deployed to a public space without security concerns.
    An extension of DataContent that provides export capabilities in different modes.
    Enumeration of supported export modes.
    Represents a plain content that includes some original content, such as data from interactive input, a file, or the result of decrypting encrypted content.
    Represents secret content, which is a specific type of plain content that stores a secret phrase.