Package edu.internet2.middleware.grouperClientExt.org.apache.commons.httpclient.contrib.methods.multipart
Class ContentTypeFilePart
java.lang.Object
edu.internet2.middleware.grouperClientExt.org.apache.commons.httpclient.methods.multipart.Part
edu.internet2.middleware.grouperClientExt.org.apache.commons.httpclient.methods.multipart.PartBase
edu.internet2.middleware.grouperClientExt.org.apache.commons.httpclient.methods.multipart.FilePart
edu.internet2.middleware.grouperClientExt.org.apache.commons.httpclient.contrib.methods.multipart.ContentTypeFilePart
A simple extension to
FilePart
that automatically determines the content type
of the file.- Version:
- $Revision $ DISCLAIMER: HttpClient developers DO NOT actively support this component. The component is provided as a reference material, which may be inappropriate to be used without additional customization.
-
Field Summary
Fields inherited from class edu.internet2.middleware.grouperClientExt.org.apache.commons.httpclient.methods.multipart.FilePart
DEFAULT_CHARSET, DEFAULT_CONTENT_TYPE, DEFAULT_TRANSFER_ENCODING, FILE_NAME
Fields inherited from class edu.internet2.middleware.grouperClientExt.org.apache.commons.httpclient.methods.multipart.Part
BOUNDARY, BOUNDARY_BYTES, CHARSET, CHARSET_BYTES, CONTENT_DISPOSITION, CONTENT_DISPOSITION_BYTES, CONTENT_TRANSFER_ENCODING, CONTENT_TRANSFER_ENCODING_BYTES, CONTENT_TYPE, CONTENT_TYPE_BYTES, CRLF, CRLF_BYTES, EXTRA, EXTRA_BYTES, QUOTE, QUOTE_BYTES
-
Constructor Summary
ConstructorDescriptionContentTypeFilePart
(String name, PartSource partSource) ContentTypeFilePart constructor.ContentTypeFilePart
(String name, PartSource partSource, String charset) ContentTypeFilePart constructor.ContentTypeFilePart
(String name, File file) ContentTypeFilePart constructor.ContentTypeFilePart
(String name, File file, String charset) ContentTypeFilePart constructor.ContentTypeFilePart
(String name, String fileName, File file) ContentTypeFilePart constructor.ContentTypeFilePart
(String name, String fileName, File file, String charset) ContentTypeFilePart constructor. -
Method Summary
Methods inherited from class edu.internet2.middleware.grouperClientExt.org.apache.commons.httpclient.methods.multipart.FilePart
getSource, lengthOfData, sendData, sendDispositionHeader
Methods inherited from class edu.internet2.middleware.grouperClientExt.org.apache.commons.httpclient.methods.multipart.PartBase
getCharSet, getContentType, getName, getTransferEncoding, setCharSet, setContentType, setName, setTransferEncoding
Methods inherited from class edu.internet2.middleware.grouperClientExt.org.apache.commons.httpclient.methods.multipart.Part
getBoundary, getLengthOfParts, getLengthOfParts, getPartBoundary, isRepeatable, length, send, sendContentTypeHeader, sendEnd, sendEndOfHeader, sendParts, sendParts, sendStart, sendTransferEncodingHeader, toString
-
Constructor Details
-
ContentTypeFilePart
ContentTypeFilePart constructor.- Parameters:
name
- the name of the partpartSource
- the source for this partcharset
- the charset encoding for this part.
-
ContentTypeFilePart
ContentTypeFilePart constructor.- Parameters:
name
- the name of the partpartSource
- the source for this part
-
ContentTypeFilePart
ContentTypeFilePart constructor.- Parameters:
name
- the name of the partfile
- the file to post- Throws:
FileNotFoundException
- if the file does not exist
-
ContentTypeFilePart
ContentTypeFilePart constructor.- Parameters:
name
- the name of the partfile
- the file to postcharset
- the charset encoding for the file- Throws:
FileNotFoundException
-
ContentTypeFilePart
ContentTypeFilePart constructor.- Parameters:
name
- the name of the partfileName
- the file namefile
- the file to post- Throws:
FileNotFoundException
- if the file does not exist
-
ContentTypeFilePart
public ContentTypeFilePart(String name, String fileName, File file, String charset) throws FileNotFoundException ContentTypeFilePart constructor.- Parameters:
name
- the name of the partfileName
- the file namefile
- the file to postcharset
- the charset encoding for the file- Throws:
FileNotFoundException
- if the file does not exist
-