Package zeroecho.sdk.io


package zeroecho.sdk.io
Stream utilities for SDK pipelines.

This package contains small helpers that adapt or post-process streams produced by SDK builders and core contexts. Utilities focus on trailer handling and other pipeline-friendly behaviors without buffering entire payloads.

Key elements

Typical usage

// Create a signature context (for example, Ed25519) in SIGN mode using your algorithm descriptor.
zeroecho.core.context.SignatureContext sc = ... created by an algorithm for SIGN ...;

// Wrap the producing stream; only the body is exposed and the signature is delivered to a callback.
try (java.io.InputStream in = new zeroecho.sdk.io.SignatureTrailerInputStream(
         sc,
         upstream,                  // original message bytes
         8192,                      // buffer size for the stripper
         sig -> { ... store or transmit 'sig' ... })) {
    in.transferTo(out);             // writes only the body to 'out'
}

Design notes

  • Utilities are single-purpose and not thread-safe; create a new instance per pipeline.
  • Resource ownership is explicit: where a stream is created from a core context, closing the utility also closes the underlying context.
Since:
1.0
  • Classes
    Class
    Description
    SignatureTrailerInputStream reads an upstream stream that has a trailing signature tag and exposes only the original body while capturing the detached signature.