org.apache.hc.core5.http.nio.entity

## Class AsyncEntityProducers

- java.lang.Object
- - org.apache.hc.core5.http.nio.entity.AsyncEntityProducers

-     public final class AsyncEntityProducers
      extends Object

  {AsyncEntityProducer} factory methods.
  Since:
    5.0

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static AsyncEntityProducer` | `create(byte[] content, ContentType contentType)`
    `static AsyncEntityProducer` | `create(byte[] content, ContentType contentType, Header... trailers)`
    `static AsyncEntityProducer` | `create(File content, ContentType contentType)`
    `static AsyncEntityProducer` | `create(File content, ContentType contentType, Header... trailers)`
    `static AsyncEntityProducer` | `create(Path content, ContentType contentType, Header... trailers)`
    `static AsyncEntityProducer` | `create(Path content, ContentType contentType, OpenOption... options)`
    `static AsyncEntityProducer` | `create(String content)`
    `static AsyncEntityProducer` | `create(String content, Charset charset)`
    `static AsyncEntityProducer` | `create(String content, Charset charset, Header... trailers)`
    `static AsyncEntityProducer` | `create(String content, ContentType contentType)`
    `static AsyncEntityProducer` | `create(String content, ContentType contentType, Header... trailers)`
    `static AsyncEntityProducer` | `create(String content, Header... trailers)`
    `static AsyncEntityProducer` | `createBinary(Callback<StreamChannel<ByteBuffer>> callback, ContentType contentType)`
    `static AsyncEntityProducer` | `createBinary(Callback<StreamChannel<ByteBuffer>> callback, ContentType contentType, Header... trailers)`
    `static AsyncEntityProducer` | `createText(Callback<StreamChannel<CharBuffer>> callback, ContentType contentType)`
    `static AsyncEntityProducer` | `createText(Callback<StreamChannel<CharBuffer>> callback, ContentType contentType, Header... trailers)`
    `static AsyncEntityProducer` | `createUrlEncoded(Iterable<? extends NameValuePair> parameters, Charset charset)`
    `static AsyncEntityProducer` | `withTrailers(AsyncEntityProducer entity, Header... trailers)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### create

          public static AsyncEntityProducer create(String content,
                                                   ContentType contentType)

    - #### create

          public static AsyncEntityProducer create(String content,
                                                   Charset charset)

    - #### create

          public static AsyncEntityProducer create(String content)

    - #### create

          public static AsyncEntityProducer create(byte[] content,
                                                   ContentType contentType)

    - #### create

          public static AsyncEntityProducer create(File content,
                                                   ContentType contentType)

    - #### createUrlEncoded

          public static AsyncEntityProducer createUrlEncoded(Iterable<? extends NameValuePair> parameters,
                                                             Charset charset)

    - #### createBinary

          public static AsyncEntityProducer createBinary(Callback<StreamChannel<ByteBuffer>> callback,
                                                         ContentType contentType)

    - #### createText

          public static AsyncEntityProducer createText(Callback<StreamChannel<CharBuffer>> callback,
                                                       ContentType contentType)

    - #### withTrailers

          public static AsyncEntityProducer withTrailers(AsyncEntityProducer entity,
                                                         Header... trailers)

    - #### create

          public static AsyncEntityProducer create(String content,
                                                   ContentType contentType,
                                                   Header... trailers)

    - #### create

          public static AsyncEntityProducer create(String content,
                                                   Charset charset,
                                                   Header... trailers)

    - #### create

          public static AsyncEntityProducer create(String content,
                                                   Header... trailers)

    - #### create

          public static AsyncEntityProducer create(byte[] content,
                                                   ContentType contentType,
                                                   Header... trailers)

    - #### create

          public static AsyncEntityProducer create(File content,
                                                   ContentType contentType,
                                                   Header... trailers)

    - #### create

          public static AsyncEntityProducer create(Path content,
                                                   ContentType contentType,
                                                   Header... trailers)
                                            throws IOException

      Throws:
        `IOException` - in case of an I/O error.
      Since:
        5.2

    - #### create

          public static AsyncEntityProducer create(Path content,
                                                   ContentType contentType,
                                                   OpenOption... options)
                                            throws IOException

      Throws:
        `IOException` - in case of an I/O error.
      Since:
        5.2

    - #### createBinary

          public static AsyncEntityProducer createBinary(Callback<StreamChannel<ByteBuffer>> callback,
                                                         ContentType contentType,
                                                         Header... trailers)

    - #### createText

          public static AsyncEntityProducer createText(Callback<StreamChannel<CharBuffer>> callback,
                                                       ContentType contentType,
                                                       Header... trailers)

Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.