public final class InputStreamBodyGenerator extends java.lang.Object implements BodyGenerator
BodyGenerator which use an InputStream for reading bytes, without having to read the entire stream in memory.
InputStream must support the InputStream.mark(int) and InputStream.reset() operation. If not, mechanisms like authentication, redirect, or
resumable download will not works.| Constructor and Description |
|---|
InputStreamBodyGenerator(java.io.InputStream inputStream) |
InputStreamBodyGenerator(java.io.InputStream inputStream,
long contentLength) |
| Modifier and Type | Method and Description |
|---|---|
Body |
createBody()
Creates a new instance of the request body to be read.
|
long |
getContentLength() |
java.io.InputStream |
getInputStream() |
public InputStreamBodyGenerator(java.io.InputStream inputStream)
public InputStreamBodyGenerator(java.io.InputStream inputStream,
long contentLength)
public java.io.InputStream getInputStream()
public long getContentLength()
public Body createBody()
createBody in interface BodyGeneratornull.Copyright © 2018. All Rights Reserved.