Class ByteArrayBody

  • All Implemented Interfaces:

    
    public final class ByteArrayBody
    extends RequestBody
                        

    Represents a request body backed by in-memory bytes.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Unit writeToStream(BufferedSink bufferedSink) Writes the request body to the provided BufferedSink.
      String getContentType() Retrieves the content type of the request body.
      BufferedSource getSource() Retrieves the source of the request body.
      • Methods inherited from class com.inmobi.media.network.okhttp.entity.body.RequestBody

        getEncoding
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • writeToStream

         Unit writeToStream(BufferedSink bufferedSink)

        Writes the request body to the provided BufferedSink.

        Parameters:
        bufferedSink - The sink to write the request body to.
      • getContentType

         String getContentType()

        Retrieves the content type of the request body.

        Returns:

        The content type.

      • getSource

         BufferedSource getSource()

        Retrieves the source of the request body.

        Returns:

        The source.