Class RepeatableInputStreamRequestEntity
- java.lang.Object
- 
- org.apache.http.entity.AbstractHttpEntity
- 
- org.apache.http.entity.BasicHttpEntity
- 
- software.amazon.awssdk.http.apache.internal.RepeatableInputStreamRequestEntity
 
 
 
- 
- All Implemented Interfaces:
- org.apache.http.HttpEntity
 
 @SdkInternalApi public class RepeatableInputStreamRequestEntity extends org.apache.http.entity.BasicHttpEntity Custom implementation ofHttpEntitythat delegates to anInputStreamEntity, with the one notable difference, that if the underlying InputStream supports being reset, this RequestEntity will report that it is repeatable and will reset the stream on all subsequent attempts to write out the request.
- 
- 
Constructor SummaryConstructors Constructor Description RepeatableInputStreamRequestEntity(HttpExecuteRequest request)Creates a new RepeatableInputStreamRequestEntity using the information from the specified request.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisChunked()booleanisRepeatable()Returns true if the underlying InputStream supports marking/reseting or if the underlying InputStreamRequestEntity is repeatable.voidwriteTo(OutputStream output)Resets the underlying InputStream if this isn't the first attempt to write out the request, otherwise simply delegates to InputStreamRequestEntity to write out the data.- 
Methods inherited from class org.apache.http.entity.BasicHttpEntitygetContent, getContentLength, isStreaming, setContent, setContentLength
 
- 
 
- 
- 
- 
Constructor Detail- 
RepeatableInputStreamRequestEntitypublic RepeatableInputStreamRequestEntity(HttpExecuteRequest request) Creates a new RepeatableInputStreamRequestEntity using the information from the specified request. If the input stream containing the request's contents is repeatable, then this RequestEntity will report as being repeatable.- Parameters:
- request- The details of the request being written out (content type, content length, and content).
 
 
- 
 - 
Method Detail- 
isChunkedpublic boolean isChunked() - Specified by:
- isChunkedin interface- org.apache.http.HttpEntity
- Overrides:
- isChunkedin class- org.apache.http.entity.AbstractHttpEntity
 
 - 
isRepeatablepublic boolean isRepeatable() Returns true if the underlying InputStream supports marking/reseting or if the underlying InputStreamRequestEntity is repeatable.- Specified by:
- isRepeatablein interface- org.apache.http.HttpEntity
- Overrides:
- isRepeatablein class- org.apache.http.entity.BasicHttpEntity
 
 - 
writeTopublic void writeTo(OutputStream output) throws IOException Resets the underlying InputStream if this isn't the first attempt to write out the request, otherwise simply delegates to InputStreamRequestEntity to write out the data.If an error is encountered the first time we try to write the request entity, we remember the original exception, and report that as the root cause if we continue to encounter errors, rather than masking the original error. - Specified by:
- writeToin interface- org.apache.http.HttpEntity
- Overrides:
- writeToin class- org.apache.http.entity.BasicHttpEntity
- Throws:
- IOException
 
 
- 
 
-