Class FileRequestEntity
- java.lang.Object
-
- org.apache.commons.httpclient.methods.FileRequestEntity
-
- All Implemented Interfaces:
RequestEntity
@Deprecated public class FileRequestEntity extends java.lang.Object implements RequestEntity
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.A RequestEntity that represents a File.- Since:
- 3.1
-
-
Constructor Summary
Constructors Constructor Description FileRequestEntity(java.io.File file, java.lang.String contentType)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description long
getContentLength()
Deprecated.Gets the request entity's length.java.lang.String
getContentType()
Deprecated.Gets the entity's content type.boolean
isRepeatable()
Deprecated.Tests ifRequestEntity.writeRequest(OutputStream)
can be called more than once.void
writeRequest(java.io.OutputStream out)
Deprecated.Writes the request entity to the given stream.
-
-
-
Method Detail
-
getContentLength
public long getContentLength()
Deprecated.Description copied from interface:RequestEntity
Gets the request entity's length. This method should return a non-negative value if the content length is known or a negative value if it is not. In the latter case theEntityEnclosingMethod
will use chunk encoding to transmit the request entity.- Specified by:
getContentLength
in interfaceRequestEntity
- Returns:
- a non-negative value when content length is known or a negative value when content length is not known
-
getContentType
public java.lang.String getContentType()
Deprecated.Description copied from interface:RequestEntity
Gets the entity's content type. This content type will be used as the value for the "Content-Type" header.- Specified by:
getContentType
in interfaceRequestEntity
- Returns:
- the entity's content type
- See Also:
HttpMethod.setRequestHeader(String, String)
-
isRepeatable
public boolean isRepeatable()
Deprecated.Description copied from interface:RequestEntity
Tests ifRequestEntity.writeRequest(OutputStream)
can be called more than once.- Specified by:
isRepeatable
in interfaceRequestEntity
- Returns:
- true if the entity can be written to
OutputStream
more than once, false otherwise.
-
writeRequest
public void writeRequest(java.io.OutputStream out) throws java.io.IOException
Deprecated.Description copied from interface:RequestEntity
Writes the request entity to the given stream.- Specified by:
writeRequest
in interfaceRequestEntity
- Throws:
java.io.IOException
-
-