Class FilePart
- java.lang.Object
-
- org.apache.commons.httpclient.methods.multipart.Part
-
- org.apache.commons.httpclient.methods.multipart.PartBase
-
- org.apache.commons.httpclient.methods.multipart.FilePart
-
@Deprecated public class FilePart extends PartBase
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.This class implements a part of a Multipart post object that consists of a file.- Since:
- 2.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_CHARSET
Deprecated.Default charset of file attachments.static java.lang.String
DEFAULT_CONTENT_TYPE
Deprecated.Default content encoding of file attachments.static java.lang.String
DEFAULT_TRANSFER_ENCODING
Deprecated.Default transfer encoding of file attachments.
-
Constructor Summary
Constructors Constructor Description FilePart(java.lang.String name, java.io.File file)
Deprecated.FilePart Constructor.FilePart(java.lang.String name, java.io.File file, java.lang.String contentType, java.lang.String charset)
Deprecated.FilePart Constructor.FilePart(java.lang.String name, java.lang.String fileName, java.io.File file)
Deprecated.FilePart Constructor.FilePart(java.lang.String name, java.lang.String fileName, java.io.File file, java.lang.String contentType, java.lang.String charset)
Deprecated.FilePart Constructor.FilePart(java.lang.String name, PartSource partSource)
Deprecated.FilePart Constructor.FilePart(java.lang.String name, PartSource partSource, java.lang.String contentType, java.lang.String charset)
Deprecated.FilePart Constructor.
-
Method Summary
-
Methods inherited from class org.apache.commons.httpclient.methods.multipart.PartBase
getCharSet, getContentType, getName, getTransferEncoding, setCharSet, setContentType, setName, setTransferEncoding
-
Methods inherited from class org.apache.commons.httpclient.methods.multipart.Part
getBoundary, getLengthOfParts, getLengthOfParts, isRepeatable, length, send, sendParts, sendParts, toString
-
-
-
-
Field Detail
-
DEFAULT_CONTENT_TYPE
public static final java.lang.String DEFAULT_CONTENT_TYPE
Deprecated.Default content encoding of file attachments.- See Also:
- Constant Field Values
-
DEFAULT_CHARSET
public static final java.lang.String DEFAULT_CHARSET
Deprecated.Default charset of file attachments.- See Also:
- Constant Field Values
-
DEFAULT_TRANSFER_ENCODING
public static final java.lang.String DEFAULT_TRANSFER_ENCODING
Deprecated.Default transfer encoding of file attachments.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FilePart
public FilePart(java.lang.String name, PartSource partSource, java.lang.String contentType, java.lang.String charset)
Deprecated.FilePart Constructor.
-
FilePart
public FilePart(java.lang.String name, PartSource partSource)
Deprecated.FilePart Constructor.- Parameters:
name
- the name for this partpartSource
- the source for this part
-
FilePart
public FilePart(java.lang.String name, java.io.File file) throws java.io.FileNotFoundException
Deprecated.FilePart Constructor.- Parameters:
name
- the name of the file partfile
- the file to post- Throws:
java.io.FileNotFoundException
- if the file is not a normal file or if it is not readable.
-
FilePart
public FilePart(java.lang.String name, java.io.File file, java.lang.String contentType, java.lang.String charset) throws java.io.FileNotFoundException
Deprecated.FilePart Constructor.- Parameters:
name
- the name of the file partfile
- the file to postcontentType
- the content type for this part, ifnull
thedefault
is usedcharset
- the charset encoding for this part, ifnull
thedefault
is used- Throws:
java.io.FileNotFoundException
- if the file is not a normal file or if it is not readable.
-
FilePart
public FilePart(java.lang.String name, java.lang.String fileName, java.io.File file) throws java.io.FileNotFoundException
Deprecated.FilePart Constructor.- Parameters:
name
- the name of the file partfileName
- the file namefile
- the file to post- Throws:
java.io.FileNotFoundException
- if the file is not a normal file or if it is not readable.
-
FilePart
public FilePart(java.lang.String name, java.lang.String fileName, java.io.File file, java.lang.String contentType, java.lang.String charset) throws java.io.FileNotFoundException
Deprecated.FilePart Constructor.- Parameters:
name
- the name of the file partfileName
- the file namefile
- the file to postcontentType
- the content type for this part, ifnull
thedefault
is usedcharset
- the charset encoding for this part, ifnull
thedefault
is used- Throws:
java.io.FileNotFoundException
- if the file is not a normal file or if it is not readable.
-
-