public static class Http.RequestBody
extends okhttp3.RequestBody
RandomAccessFile, ByteBuffer or byte array.| Constructor and Description |
|---|
RequestBody(byte[] bytes,
int length,
okhttp3.MediaType contentType)
Creates RequestBody for byte array.
|
RequestBody(ByteBuffer buffer,
okhttp3.MediaType contentType)
Creates RequestBody for ByteBuffer.
|
RequestBody(RandomAccessFile file,
long length,
okhttp3.MediaType contentType)
Creates RequestBody for RandomAccessFile.
|
RequestBody(okhttp3.RequestBody body)
Creates RequestBody for okhttp3 RequestBody.
|
| Modifier and Type | Method and Description |
|---|---|
long |
contentLength()
Gets content length.
|
okhttp3.MediaType |
contentType()
Gets content type.
|
void |
writeTo(okio.BufferedSink sink)
Writes data to the specified sink.
|
public RequestBody(@Nonnull byte[] bytes, int length, @Nonnull okhttp3.MediaType contentType)
public RequestBody(@Nonnull RandomAccessFile file, long length, @Nonnull okhttp3.MediaType contentType) throws MinioException
MinioExceptionpublic RequestBody(@Nonnull ByteBuffer buffer, @Nonnull okhttp3.MediaType contentType)
public RequestBody(@Nonnull okhttp3.RequestBody body) throws MinioException
MinioExceptionpublic okhttp3.MediaType contentType()
contentType in class okhttp3.RequestBodypublic long contentLength()
contentLength in class okhttp3.RequestBodypublic void writeTo(okio.BufferedSink sink)
throws IOException
writeTo in class okhttp3.RequestBodyIOException