public abstract class MultipartEntityBuilder extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
boundary |
protected long |
contentLength |
protected byte[] |
epilogue |
protected byte[] |
preamble |
protected long |
sizeLimit |
| Constructor and Description |
|---|
MultipartEntityBuilder(String boundary,
long sizeLimit) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
addDefault(String key,
String value) |
protected abstract void |
addPart(String name,
byte[] buf,
String contentType,
String fileName,
String headers) |
protected Map<String,String> |
getHeaders(String headers) |
abstract Multipart |
getOutput() |
abstract void |
handleBinaryPart(org.apache.commons.fileupload.MultipartStream multipartStream,
org.mule.apikit.model.parameter.Parameter parameter,
String name,
String contentType,
String fileName,
String headers) |
void |
handleBoundary(boolean firstOne) |
void |
handleEpilogue(byte[] epilogue) |
protected void |
handleFormBodyPart(org.apache.http.entity.mime.FormBodyPart formBodyPart) |
void |
handlePart(org.apache.commons.fileupload.MultipartStream multipartStream,
org.mule.apikit.model.parameter.Parameter parameter,
String name,
String contentType,
String fileName,
String headers) |
void |
handlePreamble(byte[] preamble) |
void |
handleStreamTermination() |
void |
handleTextPart(org.apache.commons.fileupload.MultipartStream multipartStream,
org.mule.apikit.model.parameter.Parameter parameter,
String name,
String contentType,
String fileName,
String headers) |
protected void |
increaseContentLength(long partLength) |
protected byte[] |
partToByteArray(org.apache.commons.fileupload.MultipartStream stream) |
protected byte[] preamble
protected byte[] epilogue
protected long contentLength
protected final long sizeLimit
protected final String boundary
public MultipartEntityBuilder(String boundary, long sizeLimit)
public abstract void addDefault(String key, String value) throws InvalidFormParameterException
InvalidFormParameterExceptionpublic abstract Multipart getOutput()
protected abstract void addPart(String name, byte[] buf, String contentType, String fileName, String headers) throws InvalidFormParameterException
InvalidFormParameterExceptionpublic abstract void handleBinaryPart(org.apache.commons.fileupload.MultipartStream multipartStream,
org.mule.apikit.model.parameter.Parameter parameter,
String name,
String contentType,
String fileName,
String headers)
throws InvalidFormParameterException
InvalidFormParameterExceptionpublic void handleTextPart(org.apache.commons.fileupload.MultipartStream multipartStream,
org.mule.apikit.model.parameter.Parameter parameter,
String name,
String contentType,
String fileName,
String headers)
throws InvalidFormParameterException
InvalidFormParameterExceptionprotected byte[] partToByteArray(org.apache.commons.fileupload.MultipartStream stream)
throws IOException
IOExceptionpublic void handlePart(org.apache.commons.fileupload.MultipartStream multipartStream,
org.mule.apikit.model.parameter.Parameter parameter,
String name,
String contentType,
String fileName,
String headers)
throws InvalidFormParameterException
InvalidFormParameterExceptionpublic void handleBoundary(boolean firstOne)
throws InvalidFormParameterException,
IOException
public void handlePreamble(byte[] preamble)
throws InvalidFormParameterException
InvalidFormParameterExceptionpublic void handleEpilogue(byte[] epilogue)
throws InvalidFormParameterException
InvalidFormParameterExceptionpublic void handleStreamTermination()
throws InvalidFormParameterException
InvalidFormParameterExceptionprotected void handleFormBodyPart(org.apache.http.entity.mime.FormBodyPart formBodyPart)
throws InvalidFormParameterException
InvalidFormParameterExceptionprotected void increaseContentLength(long partLength)
throws InvalidFormParameterException
InvalidFormParameterExceptionCopyright © 2025. All rights reserved.