Class InputStreamBodyWithLength
- java.lang.Object
-
- org.apache.http.entity.mime.content.AbstractContentBody
-
- org.apache.http.entity.mime.content.InputStreamBody
-
- org.apache.sling.testing.clients.util.InputStreamBodyWithLength
-
- All Implemented Interfaces:
org.apache.http.entity.mime.content.ContentBody
,org.apache.http.entity.mime.content.ContentDescriptor
public class InputStreamBodyWithLength extends org.apache.http.entity.mime.content.InputStreamBody
If we want to upload a file that is a resource in a jar file, the http client expects a content length.
-
-
Constructor Summary
Constructors Constructor Description InputStreamBodyWithLength(String resourcePath, String contentType, String fileName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getContentLength()
-
Methods inherited from class org.apache.http.entity.mime.content.InputStreamBody
getFilename, getInputStream, getTransferEncoding, writeTo
-
-
-
-
Constructor Detail
-
InputStreamBodyWithLength
public InputStreamBodyWithLength(String resourcePath, String contentType, String fileName) throws ClientException
- Throws:
ClientException
-
-