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.RequestBody
RequestBody that takes anInputStream
.
-
-
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 @linkRequestBody
from an @linkInputStream
.void
writeTo(okio.BufferedSink sink)
-
-
-
Method Detail
-
create
public static okhttp3.RequestBody create(okhttp3.MediaType mediaType, java.io.InputStream inputStream)
Creates the @linkRequestBody
from an @linkInputStream
.- Parameters:
mediaType
- the media typeinputStream
- the input stream- Returns:
- the request body
-
contentType
public okhttp3.MediaType contentType()
- Specified by:
contentType
in classokhttp3.RequestBody
-
writeTo
public void writeTo(okio.BufferedSink sink) throws java.io.IOException
- Specified by:
writeTo
in classokhttp3.RequestBody
- Throws:
java.io.IOException
-
-