public final class AsyncEntityProducers extends Object
public static AsyncEntityProducer create(String content, ContentType contentType)
public static AsyncEntityProducer create(String content, Charset charset)
public static AsyncEntityProducer create(String content)
public static AsyncEntityProducer create(byte[] content, ContentType contentType)
public static AsyncEntityProducer create(File content, ContentType contentType)
public static AsyncEntityProducer createUrlEncoded(Iterable<? extends NameValuePair> parameters, Charset charset)
public static AsyncEntityProducer createBinary(Callback<StreamChannel<ByteBuffer>> callback, ContentType contentType)
public static AsyncEntityProducer createText(Callback<StreamChannel<CharBuffer>> callback, ContentType contentType)
public static AsyncEntityProducer withTrailers(AsyncEntityProducer entity, Header... trailers)
public static AsyncEntityProducer create(String content, ContentType contentType, Header... trailers)
public static AsyncEntityProducer create(String content, Charset charset, Header... trailers)
public static AsyncEntityProducer create(String content, Header... trailers)
public static AsyncEntityProducer create(byte[] content, ContentType contentType, Header... trailers)
public static AsyncEntityProducer create(File content, ContentType contentType, Header... trailers)
public static AsyncEntityProducer create(Path content, ContentType contentType, Header... trailers) throws IOException
IOException
- in case of an I/O error.public static AsyncEntityProducer create(Path content, ContentType contentType, OpenOption... options) throws IOException
IOException
- in case of an I/O error.public static AsyncEntityProducer createBinary(Callback<StreamChannel<ByteBuffer>> callback, ContentType contentType, Header... trailers)
public static AsyncEntityProducer createText(Callback<StreamChannel<CharBuffer>> callback, ContentType contentType, Header... trailers)
Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.