public 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.| Modifier and Type | Class and Description |
|---|---|
protected class |
InputStreamBodyGenerator.ISBody |
| Modifier and Type | Field and Description |
|---|---|
protected InputStream |
inputStream |
| 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.
|
protected InputStreamBodyGenerator.ISBody |
doCreateBody() |
InputStream |
getInputStream() |
void |
patchNettyChunkingIssue(boolean patchNettyChunkingIssue)
HACK: This is required because Netty has issues with chunking.
|
protected final InputStream inputStream
public InputStreamBodyGenerator(InputStream inputStream)
public InputStream getInputStream()
public Body createBody() throws IOException
BodyGeneratorcreateBody in interface BodyGeneratornull.IOException - If the body could not be created.protected InputStreamBodyGenerator.ISBody doCreateBody()
public void patchNettyChunkingIssue(boolean patchNettyChunkingIssue)
patchNettyChunkingIssue - Copyright © 2019. All Rights Reserved.