Class ByteBuffersAsyncRequestBody
- java.lang.Object
-
- software.amazon.awssdk.core.internal.async.ByteBuffersAsyncRequestBody
-
- All Implemented Interfaces:
org.reactivestreams.Publisher<ByteBuffer>
,AsyncRequestBody
,SdkPublisher<ByteBuffer>
public final class ByteBuffersAsyncRequestBody extends Object implements AsyncRequestBody
An implementation ofAsyncRequestBody
for providing data from the suppliedByteBuffer
array. This is created using static methods onAsyncRequestBody
- See Also:
AsyncRequestBody.fromBytes(byte[])
,AsyncRequestBody.fromBytesUnsafe(byte[])
,AsyncRequestBody.fromByteBuffer(ByteBuffer)
,AsyncRequestBody.fromByteBufferUnsafe(ByteBuffer)
,AsyncRequestBody.fromByteBuffers(ByteBuffer...)
,AsyncRequestBody.fromByteBuffersUnsafe(ByteBuffer...)
,AsyncRequestBody.fromString(String)
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<Long>
contentLength()
String
contentType()
static ByteBuffersAsyncRequestBody
from(byte[] bytes)
static ByteBuffersAsyncRequestBody
from(String mimetype, byte[] bytes)
static ByteBuffersAsyncRequestBody
of(Long length, ByteBuffer... buffers)
static ByteBuffersAsyncRequestBody
of(String mimetype, Long length, ByteBuffer... buffers)
static ByteBuffersAsyncRequestBody
of(String mimetype, ByteBuffer... buffers)
static ByteBuffersAsyncRequestBody
of(ByteBuffer... buffers)
void
subscribe(org.reactivestreams.Subscriber<? super ByteBuffer> s)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.core.async.AsyncRequestBody
split, split
-
Methods inherited from interface software.amazon.awssdk.core.async.SdkPublisher
addTrailingData, buffer, doAfterOnCancel, doAfterOnComplete, doAfterOnError, filter, filter, flatMapIterable, limit, map, subscribe
-
-
-
-
Method Detail
-
contentLength
public Optional<Long> contentLength()
- Specified by:
contentLength
in interfaceAsyncRequestBody
- Returns:
- The content length of the data being produced.
-
contentType
public String contentType()
- Specified by:
contentType
in interfaceAsyncRequestBody
- Returns:
- The content type of the data being produced.
-
subscribe
public void subscribe(org.reactivestreams.Subscriber<? super ByteBuffer> s)
- Specified by:
subscribe
in interfaceorg.reactivestreams.Publisher<ByteBuffer>
-
of
public static ByteBuffersAsyncRequestBody of(ByteBuffer... buffers)
-
of
public static ByteBuffersAsyncRequestBody of(Long length, ByteBuffer... buffers)
-
of
public static ByteBuffersAsyncRequestBody of(String mimetype, ByteBuffer... buffers)
-
of
public static ByteBuffersAsyncRequestBody of(String mimetype, Long length, ByteBuffer... buffers)
-
from
public static ByteBuffersAsyncRequestBody from(byte[] bytes)
-
from
public static ByteBuffersAsyncRequestBody from(String mimetype, byte[] bytes)
-
-