Package sonia.scm.net.ahc
Class ByteSourceContent
java.lang.Object
sonia.scm.net.ahc.ByteSourceContent
- All Implemented Interfaces:
Content
ByteSource content for AdvancedHttpRequestWithBody.- Since:
- 1.46
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprepare(AdvancedHttpRequestWithBody request) Sets the content length for the request.voidprocess(OutputStream output) Copies the content of the byte source to the output stream.
-
Constructor Details
-
ByteSourceContent
public ByteSourceContent(com.google.common.io.ByteSource byteSource)
-
-
Method Details
-
prepare
Sets the content length for the request.- Specified by:
preparein interfaceContent- Parameters:
request- http request- Throws:
IOException
-
process
Copies the content of the byte source to the output stream.- Specified by:
processin interfaceContent- Parameters:
output- output stream- Throws:
IOException
-