public final class InputStreamBodyGenerator extends Object implements BodyGenerator
BodyGenerator
which use an InputStream
for reading bytes, without having to read the entire stream in memory.
NOTE: The 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(InputStream inputStream) |
Modifier and Type | Method and Description |
---|---|
Body |
createBody()
Creates a new instance of the request body to be read.
|
InputStream |
getInputStream() |
void |
patchNetty3ChunkingIssue(boolean patchNetty3ChunkingIssue)
HACK: This is required because Netty has issues with chunking.
|
public InputStreamBodyGenerator(InputStream inputStream)
public InputStream getInputStream()
public Body createBody()
createBody
in interface BodyGenerator
null
.public void patchNetty3ChunkingIssue(boolean patchNetty3ChunkingIssue)
patchNettyChunkingIssue
- Copyright © 2015. All Rights Reserved.