Package: groovy.http

## [Groovy] Class HttpStreamResult.LinePublisher

- groovy.http.HttpStreamResult.LinePublisher

- All Implemented Interfaces and Traits:
    Flow.Publisher<String>

      static final class HttpStreamResult.LinePublisher
      extends Object
      implements Flow.Publisher<String>

  Adapts a chunked byte publisher into a publisher of complete lines. Buffers across chunk boundaries so multi-chunk lines emit correctly, and honours downstream demand — a single upstream chunk containing many newlines is drip-fed to the downstream one line per `request`.

  Since:
    6.0.0

- - ### Constructor Summary

    Constructors
    Constructor and description
    `LinePublisher(Flow.Publisher<List<ByteBuffer>> source, Charset charset)` Creates a publisher that emits complete lines decoded from byte chunks.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `void` | `subscribe(Flow.Subscriber<? super String> downstream)` Subscribes downstream and mediates demand through a line-aware subscription.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LinePublisher(Flow.Publisher<List<ByteBuffer>> source, Charset charset)

      Creates a publisher that emits complete lines decoded from byte chunks.

      Parameters:
        `source` - the upstream byte-chunk publisher
        `charset` - the charset used for decoding bytes

  - ### Method Detail

    - #### @Override
      void subscribe(Flow.Subscriber<? super String> downstream)

      Subscribes downstream and mediates demand through a line-aware subscription.

      Parameters:
        `downstream` - the subscriber receiving decoded lines