Package io.minio
Class Http.Body
java.lang.Object
io.minio.Http.Body
- Enclosing class:
- Http
-
Constructor Summary
ConstructorsConstructorDescriptionCreates Body for byte array.Body(RandomAccessFile file, long length, okhttp3.MediaType contentType, String sha256Hash, String md5Hash) Creates Body for RandomAccessFile.Creates Body for ByteBuffer, string or XML encodable object.Body(okhttp3.RequestBody requestBody) Creates Body for okhttp3 RequestBody. -
Method Summary
Modifier and TypeMethodDescriptionokhttp3.MediaTypeGets content type of this body.headers()Creates headers for this body.booleanChecks whether this body is okhttp3 RequestBody.md5Hash()Gets SHA256 hash of this body.Gets SHA256 hash of this body.Creates HTTP RequestBody for this body.toString()
-
Constructor Details
-
Body
public Body(okhttp3.RequestBody requestBody) Creates Body for okhttp3 RequestBody. -
Body
public Body(RandomAccessFile file, long length, okhttp3.MediaType contentType, String sha256Hash, String md5Hash) Creates Body for RandomAccessFile. -
Body
public Body(byte[] data, int length, okhttp3.MediaType contentType, String sha256Hash, String md5Hash) Creates Body for byte array. -
Body
public Body(Object body, okhttp3.MediaType contentType, String sha256Hash, String md5Hash) throws MinioException Creates Body for ByteBuffer, string or XML encodable object.- Throws:
MinioException
-
-
Method Details
-
contentType
public okhttp3.MediaType contentType()Gets content type of this body. -
sha256Hash
Gets SHA256 hash of this body. -
md5Hash
Gets SHA256 hash of this body. -
isHttpRequestBody
public boolean isHttpRequestBody()Checks whether this body is okhttp3 RequestBody. -
headers
Creates headers for this body. -
toRequestBody
Creates HTTP RequestBody for this body.- Throws:
MinioException
-
toString
-