Class InputStreamRequestBody


  • public class InputStreamRequestBody
    extends okhttp3.RequestBody
    RequestBody that takes an InputStream.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class okhttp3.RequestBody

        okhttp3.RequestBody.Companion
    • Field Summary

      • Fields inherited from class okhttp3.RequestBody

        Companion
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      okhttp3.MediaType contentType()  
      static okhttp3.RequestBody create​(okhttp3.MediaType mediaType, java.io.InputStream inputStream)
      Creates the @link RequestBody from an @link InputStream.
      void writeTo​(okio.BufferedSink sink)  
      • Methods inherited from class okhttp3.RequestBody

        contentLength, create, create, create, create, create, create, create, create, create, create, create, create, create, isDuplex, isOneShot
      • Methods inherited from class java.lang.Object

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

      • create

        public static okhttp3.RequestBody create​(okhttp3.MediaType mediaType,
                                                 java.io.InputStream inputStream)
        Creates the @link RequestBody from an @link InputStream.
        Parameters:
        mediaType - the media type
        inputStream - the input stream
        Returns:
        the request body
      • contentType

        public okhttp3.MediaType contentType()
        Specified by:
        contentType in class okhttp3.RequestBody
      • writeTo

        public void writeTo​(okio.BufferedSink sink)
                     throws java.io.IOException
        Specified by:
        writeTo in class okhttp3.RequestBody
        Throws:
        java.io.IOException