Class PartFactory
- java.lang.Object
-
- org.apache.axiom.attachments.impl.PartFactory
-
public class PartFactory extends Object
The PartFactory creates an object that represents a Part (implements the Part interface). There are different ways to represent a part (backing file or backing array etc.). These different implementations should not be exposed to the other layers of the code. The PartFactory helps maintain this abstraction, and makes it easier to add new implementations.
-
-
Constructor Summary
Constructors Constructor Description PartFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PartcreatePart(LifecycleManager manager, MIMEBodyPartInputStream in, boolean isSOAPPart, int thresholdSize, String attachmentDir, int messageContentLength)Creates a part from the input stream.
-
-
-
Method Detail
-
createPart
public static Part createPart(LifecycleManager manager, MIMEBodyPartInputStream in, boolean isSOAPPart, int thresholdSize, String attachmentDir, int messageContentLength) throws OMException
Creates a part from the input stream. The remaining parameters are used to determine if the part should be represented in memory (byte buffers) or backed by a file.- Parameters:
in- MIMEBodyPartInputStreamisSOAPPart-thresholdSize-attachmentDir-messageContentLength-- Returns:
- Part
- Throws:
OMException- if any exception is encountered while processing.
-
-