Package io.minio
Class Http.RequestBody
java.lang.Object
okhttp3.RequestBody
io.minio.Http.RequestBody
- Enclosing class:
- Http
public static class Http.RequestBody
extends okhttp3.RequestBody
HTTP request body of
RandomAccessFile, ByteBuffer or byte array.-
Nested Class Summary
Nested classes/interfaces inherited from class okhttp3.RequestBody
okhttp3.RequestBody.Companion -
Field Summary
Fields inherited from class okhttp3.RequestBody
Companion, EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionRequestBody(byte[] bytes, int length, okhttp3.MediaType contentType) Deprecated.RequestBody(byte[] bytes, int length, okhttp3.MediaType contentType, String bodyString) Creates RequestBody for byte array.RequestBody(ByteBuffer buffer, okhttp3.MediaType contentType) Deprecated.RequestBody(ByteBuffer buffer, okhttp3.MediaType contentType, String bodyString) Creates RequestBody for ByteBuffer.RequestBody(RandomAccessFile file, long length, okhttp3.MediaType contentType) Deprecated.RequestBody(RandomAccessFile file, long length, okhttp3.MediaType contentType, String bodyString) Creates RequestBody for RandomAccessFile.RequestBody(okhttp3.RequestBody body) Creates RequestBody for okhttp3 RequestBody. -
Method Summary
Modifier and TypeMethodDescriptionGet body trace string.longGets content length.okhttp3.MediaTypeGets content type.voidwriteTo(okio.BufferedSink sink) Writes data to the specified sink.Methods inherited from class okhttp3.RequestBody
create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, isDuplex, isOneShot, sha256
-
Constructor Details
-
RequestBody
public RequestBody(@Nonnull byte[] bytes, int length, @Nonnull okhttp3.MediaType contentType, String bodyString) Creates RequestBody for byte array. -
RequestBody
public RequestBody(@Nonnull RandomAccessFile file, long length, @Nonnull okhttp3.MediaType contentType, String bodyString) throws MinioException Creates RequestBody for RandomAccessFile.- Throws:
MinioException
-
RequestBody
public RequestBody(@Nonnull ByteBuffer buffer, @Nonnull okhttp3.MediaType contentType, String bodyString) Creates RequestBody for ByteBuffer. -
RequestBody
@Deprecated public RequestBody(@Nonnull byte[] bytes, int length, @Nonnull okhttp3.MediaType contentType) Deprecated.Creates RequestBody for byte array. -
RequestBody
@Deprecated public RequestBody(@Nonnull RandomAccessFile file, long length, @Nonnull okhttp3.MediaType contentType) throws MinioException Deprecated.Creates RequestBody for RandomAccessFile.- Throws:
MinioException
-
RequestBody
Deprecated.Creates RequestBody for ByteBuffer. -
RequestBody
Creates RequestBody for okhttp3 RequestBody.- Throws:
MinioException
-
-
Method Details
-
contentType
public okhttp3.MediaType contentType()Gets content type.- Specified by:
contentTypein classokhttp3.RequestBody
-
contentLength
public long contentLength()Gets content length.- Overrides:
contentLengthin classokhttp3.RequestBody
-
writeTo
Writes data to the specified sink.- Specified by:
writeToin classokhttp3.RequestBody- Throws:
IOException
-
bodyString
Get body trace string.
-