Class CountingFileRequestBody


  • public class CountingFileRequestBody
    extends okhttp3.RequestBody
    Based on: https://gist.github.com/eduardb/dd2dc530afd37108e1ac
    • Field Detail

      • CONTENT_BINARY

        protected static final okhttp3.MediaType CONTENT_BINARY
      • requestBodyData

        protected final T requestBodyData
    • Method Detail

      • contentLength

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

        public void writeTo​(okio.BufferedSink sink)
        Specified by:
        writeTo in class okhttp3.RequestBody
      • contentType

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