Interface PartSource
- All Known Implementing Classes:
ByteArrayPartSource,FilePartSource
Deprecated.
Jakarta Commons HttpClient 3.x is deprecated in the Jenkins project.
It is not recommended to use it in any new code.
Instead, use HTTP client API plugins as a dependency in your code.
E.g.
Apache HttpComponents Client API 4.x Plugin or
Async HTTP Client Plugin.
An interface for providing access to data when posting MultiPart messages.
- Since:
- 2.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Gets a new InputStream for reading this source.Deprecated.Gets the name of the file this source represents.longDeprecated.Gets the number of bytes contained in this source.
-
Method Details
-
getLength
long getLength()Deprecated.Gets the number of bytes contained in this source.- Returns:
- a value >= 0
-
getFileName
String getFileName()Deprecated.Gets the name of the file this source represents.- Returns:
- the fileName used for posting a MultiPart file part
-
createInputStream
Deprecated.Gets a new InputStream for reading this source. This method can be called more than once and should therefore return a new stream every time.- Returns:
- a new InputStream
- Throws:
IOException- if an error occurs when creating the InputStream
-