public final class ByteBuffersAsyncRequestBody extends Object implements AsyncRequestBody
AsyncRequestBody for providing data from the supplied ByteBuffer array. This is created
using static methods on AsyncRequestBodyAsyncRequestBody.fromBytes(byte[]),
AsyncRequestBody.fromBytesUnsafe(byte[]),
AsyncRequestBody.fromByteBuffer(ByteBuffer),
AsyncRequestBody.fromByteBufferUnsafe(ByteBuffer),
AsyncRequestBody.fromByteBuffers(ByteBuffer...),
AsyncRequestBody.fromByteBuffersUnsafe(ByteBuffer...),
AsyncRequestBody.fromString(String)| Modifier and Type | Method and Description |
|---|---|
Optional<Long> |
contentLength() |
String |
contentType() |
static ByteBuffersAsyncRequestBody |
from(byte[] bytes) |
static ByteBuffersAsyncRequestBody |
from(String mimetype,
byte[] bytes) |
static ByteBuffersAsyncRequestBody |
of(ByteBuffer... buffers) |
static ByteBuffersAsyncRequestBody |
of(Long length,
ByteBuffer... buffers) |
static ByteBuffersAsyncRequestBody |
of(String mimetype,
ByteBuffer... buffers) |
static ByteBuffersAsyncRequestBody |
of(String mimetype,
Long length,
ByteBuffer... buffers) |
void |
subscribe(<any> s)
Subscribes to the publisher with the given
Consumer. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitempty, forBlockingInputStream, forBlockingOutputStream, fromByteBuffer, fromByteBuffers, fromByteBuffersUnsafe, fromByteBufferUnsafe, fromBytes, fromBytesUnsafe, fromFile, fromFile, fromInputStream, fromPublisher, fromRemainingByteBuffer, fromRemainingByteBuffers, fromRemainingByteBuffersUnsafe, fromRemainingByteBufferUnsafe, fromString, fromStringadapt, buffer, doAfterOnCancel, doAfterOnComplete, doAfterOnError, filter, filter, flatMapIterable, limit, mappublic Optional<Long> contentLength()
contentLength in interface AsyncRequestBodypublic String contentType()
contentType in interface AsyncRequestBodypublic void subscribe(<any> s)
SdkPublisherConsumer. This consumer will be called for each event
published. There is no backpressure using this method if the Consumer dispatches processing asynchronously. If more
control over backpressure is required, consider using #subscribe(Subscriber).subscribe in interface SdkPublisher<ByteBuffer>s - Consumer to process event.public static ByteBuffersAsyncRequestBody of(ByteBuffer... buffers)
public static ByteBuffersAsyncRequestBody of(Long length, ByteBuffer... buffers)
public static ByteBuffersAsyncRequestBody of(String mimetype, ByteBuffer... buffers)
public static ByteBuffersAsyncRequestBody of(String mimetype, Long length, ByteBuffer... buffers)
public static ByteBuffersAsyncRequestBody from(byte[] bytes)
public static ByteBuffersAsyncRequestBody from(String mimetype, byte[] bytes)
Copyright © 2023. All rights reserved.