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

    Constructors
    Constructor
    Description
    RequestBody(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 Type
    Method
    Description
    Get body trace string.
    long
    Gets content length.
    okhttp3.MediaType
    Gets content type.
    void
    writeTo(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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 public RequestBody(@Nonnull ByteBuffer buffer, @Nonnull okhttp3.MediaType contentType)
      Deprecated.
      Creates RequestBody for ByteBuffer.
    • RequestBody

      public RequestBody(@Nonnull okhttp3.RequestBody body) throws MinioException
      Creates RequestBody for okhttp3 RequestBody.
      Throws:
      MinioException
  • Method Details

    • contentType

      public okhttp3.MediaType contentType()
      Gets content type.
      Specified by:
      contentType in class okhttp3.RequestBody
    • contentLength

      public long contentLength()
      Gets content length.
      Overrides:
      contentLength in class okhttp3.RequestBody
    • writeTo

      public void writeTo(okio.BufferedSink sink) throws IOException
      Writes data to the specified sink.
      Specified by:
      writeTo in class okhttp3.RequestBody
      Throws:
      IOException
    • bodyString

      public String bodyString()
      Get body trace string.