Class ModifiedMultipartEntity
- java.lang.Object
-
- org.apache.manifoldcf.agents.output.solr.ModifiedMultipartEntity
-
- All Implemented Interfaces:
org.apache.http.HttpEntity
public class ModifiedMultipartEntity extends java.lang.Object implements org.apache.http.HttpEntityMultipart/form coded HTTP entity consisting of multiple body parts.- Since:
- 4.0
-
-
Constructor Summary
Constructors Constructor Description ModifiedMultipartEntity()Creates an instance using modeHttpMultipartMode.STRICTModifiedMultipartEntity(org.apache.http.entity.mime.HttpMultipartMode mode)Creates an instance using the specifiedHttpMultipartModemode.ModifiedMultipartEntity(org.apache.http.entity.mime.HttpMultipartMode mode, java.lang.String boundary, java.nio.charset.Charset charset)Creates an instance using the specified parameters
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddPart(java.lang.String name, org.apache.http.entity.mime.content.ContentBody contentBody)voidaddPart(org.apache.http.entity.mime.FormBodyPart bodyPart)voidconsumeContent()Deprecated.protected java.lang.StringgenerateBoundary()protected java.lang.StringgenerateContentType(java.lang.String boundary, java.nio.charset.Charset charset)java.io.InputStreamgetContent()org.apache.http.HeadergetContentEncoding()longgetContentLength()org.apache.http.HeadergetContentType()booleanisChunked()booleanisRepeatable()booleanisStreaming()voidwriteTo(java.io.OutputStream outstream)
-
-
-
Constructor Detail
-
ModifiedMultipartEntity
public ModifiedMultipartEntity(org.apache.http.entity.mime.HttpMultipartMode mode, java.lang.String boundary, java.nio.charset.Charset charset)Creates an instance using the specified parameters- Parameters:
mode- the mode to use, may benull, in which caseHttpMultipartMode.STRICTis usedboundary- the boundary string, may benull, in which casegenerateBoundary()is invoked to create the stringcharset- the character set to use, may benull, in which caseMIME.DEFAULT_CHARSET- i.e. US-ASCII - is used.
-
ModifiedMultipartEntity
public ModifiedMultipartEntity(org.apache.http.entity.mime.HttpMultipartMode mode)
Creates an instance using the specifiedHttpMultipartModemode. Boundary and charset are set tonull.- Parameters:
mode- the desired mode
-
ModifiedMultipartEntity
public ModifiedMultipartEntity()
Creates an instance using modeHttpMultipartMode.STRICT
-
-
Method Detail
-
generateContentType
protected java.lang.String generateContentType(java.lang.String boundary, java.nio.charset.Charset charset)
-
generateBoundary
protected java.lang.String generateBoundary()
-
addPart
public void addPart(org.apache.http.entity.mime.FormBodyPart bodyPart)
-
addPart
public void addPart(java.lang.String name, org.apache.http.entity.mime.content.ContentBody contentBody)
-
isRepeatable
public boolean isRepeatable()
- Specified by:
isRepeatablein interfaceorg.apache.http.HttpEntity
-
isChunked
public boolean isChunked()
- Specified by:
isChunkedin interfaceorg.apache.http.HttpEntity
-
isStreaming
public boolean isStreaming()
- Specified by:
isStreamingin interfaceorg.apache.http.HttpEntity
-
getContentLength
public long getContentLength()
- Specified by:
getContentLengthin interfaceorg.apache.http.HttpEntity
-
getContentType
public org.apache.http.Header getContentType()
- Specified by:
getContentTypein interfaceorg.apache.http.HttpEntity
-
getContentEncoding
public org.apache.http.Header getContentEncoding()
- Specified by:
getContentEncodingin interfaceorg.apache.http.HttpEntity
-
consumeContent
@Deprecated public void consumeContent() throws java.io.IOException, java.lang.UnsupportedOperationExceptionDeprecated.- Specified by:
consumeContentin interfaceorg.apache.http.HttpEntity- Throws:
java.io.IOExceptionjava.lang.UnsupportedOperationException
-
getContent
public java.io.InputStream getContent() throws java.io.IOException, java.lang.UnsupportedOperationException- Specified by:
getContentin interfaceorg.apache.http.HttpEntity- Throws:
java.io.IOExceptionjava.lang.UnsupportedOperationException
-
writeTo
public void writeTo(java.io.OutputStream outstream) throws java.io.IOException- Specified by:
writeToin interfaceorg.apache.http.HttpEntity- Throws:
java.io.IOException
-
-