Package com.ibm.cloud.sdk.core.http
Class InputStreamRequestBody
- java.lang.Object
-
- okhttp3.RequestBody
-
- com.ibm.cloud.sdk.core.http.InputStreamRequestBody
-
public class InputStreamRequestBody extends okhttp3.RequestBodyRequestBody that takes anInputStream.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description okhttp3.MediaTypecontentType()static okhttp3.RequestBodycreate(okhttp3.MediaType mediaType, java.io.InputStream inputStream)Creates the @linkRequestBodyfrom an @linkInputStream.voidwriteTo(okio.BufferedSink sink)
-
-
-
Method Detail
-
create
public static okhttp3.RequestBody create(okhttp3.MediaType mediaType, java.io.InputStream inputStream)Creates the @linkRequestBodyfrom an @linkInputStream.- Parameters:
mediaType- the media typeinputStream- the input stream- Returns:
- the request body
-
contentType
public okhttp3.MediaType contentType()
- Specified by:
contentTypein classokhttp3.RequestBody
-
writeTo
public void writeTo(okio.BufferedSink sink) throws java.io.IOException- Specified by:
writeToin classokhttp3.RequestBody- Throws:
java.io.IOException
-
-