Package org.jvnet.mimepull
Class MIMEConfig
java.lang.Object
org.jvnet.mimepull.MIMEConfig
Configuration for MIME message parsing and storing.
- Author:
- Jitendra Kotamraju
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidvoidsetMemoryThreshold(long memoryThreshold) If the attachment is greater than the threshold, it is written to the disk.voidsetParseEagerly(boolean parseEagerly) Sets whether message should be parsed eagerly.voidvalidate()Validates if it can create temporary files.
-
Constructor Details
-
MIMEConfig
public MIMEConfig()Create new MIMEConfig
-
-
Method Details
-
setParseEagerly
public void setParseEagerly(boolean parseEagerly) Sets whether message should be parsed eagerly.- Parameters:
parseEagerly- true if to parse eagerly
-
setMemoryThreshold
public void setMemoryThreshold(long memoryThreshold) If the attachment is greater than the threshold, it is written to the disk.- Parameters:
memoryThreshold- no of bytes per attachment if -1, then the whole attachment is kept in memory
-
setDir
- Parameters:
directory- temp directory
-
validate
public void validate()Validates if it can create temporary files. Otherwise, it stores attachment contents in memory.
-