Class EstServerKeygenResponse.Body

java.lang.Object
zeroecho.pki.server.est.EstServerKeygenResponse.Body
All Implemented Interfaces:
AutoCloseable
Enclosing class:
EstServerKeygenResponse

public static final class EstServerKeygenResponse.Body extends Object implements AutoCloseable
Thread-confined encrypted multipart delivery. Writing uses a fixed 64 KiB transfer buffer plus base64 encoding state. Close releases custody and is idempotent; it never deletes the retained artifact or acknowledges receipt.
  • Method Details

    • writeTo

      public void writeTo(OutputStream output, CancellationSignal cancellation) throws IOException
      Writes one complete base64 multipart response without closing the caller's stream. Ciphertext is streamed from the leased durable artifact.
      Parameters:
      output - caller-owned HTTP response stream
      cancellation - checked before and during delivery
      Throws:
      IOException - if ciphertext or transport I/O fails
      IllegalStateException - if closed or already written
    • close

      public void close() throws IOException
      Releases the ciphertext lease; safe to call repeatedly.
      Specified by:
      close in interface AutoCloseable
      Throws:
      IOException