Class JacksonHttpBodyOutput<T>

java.lang.Object
ru.tinkoff.kora.json.jackson.module.http.JacksonHttpBodyOutput<T>
All Implemented Interfaces:
Closeable, AutoCloseable, Flow.Publisher<ByteBuffer>, ru.tinkoff.kora.http.common.body.HttpBody, ru.tinkoff.kora.http.common.body.HttpBodyOutput

public final class JacksonHttpBodyOutput<T> extends Object implements ru.tinkoff.kora.http.common.body.HttpBodyOutput
  • Constructor Details

    • JacksonHttpBodyOutput

      public JacksonHttpBodyOutput(com.fasterxml.jackson.databind.ObjectWriter objectMapper, ru.tinkoff.kora.common.Context context, T value)
  • Method Details

    • contentLength

      public long contentLength()
      Specified by:
      contentLength in interface ru.tinkoff.kora.http.common.body.HttpBody
      Specified by:
      contentLength in interface ru.tinkoff.kora.http.common.body.HttpBodyOutput
    • contentType

      public String contentType()
      Specified by:
      contentType in interface ru.tinkoff.kora.http.common.body.HttpBody
      Specified by:
      contentType in interface ru.tinkoff.kora.http.common.body.HttpBodyOutput
    • subscribe

      public void subscribe(Flow.Subscriber<? super ByteBuffer> subscriber)
      Specified by:
      subscribe in interface Flow.Publisher<T>
      Specified by:
      subscribe in interface ru.tinkoff.kora.http.common.body.HttpBodyOutput
    • write

      public void write(OutputStream os) throws IOException
      Specified by:
      write in interface ru.tinkoff.kora.http.common.body.HttpBodyOutput
      Throws:
      IOException
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException