java.lang.Object
org.jvnet.mimepull.MIMEConfig
Configuration for MIME message parsing and storing.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionCreate new MIMEConfigprivate
MIMEConfig
(boolean parseEagerly, int chunkSize, long inMemoryThreshold, String dir, String prefix, String suffix) -
Method Summary
Modifier and TypeMethodDescription(package private) int
(package private) long
(package private) File
(package private) String
(package private) String
(package private) boolean
(package private) boolean
(package private) void
setChunkSize
(int chunkSize) final void
void
setMemoryThreshold
(long memoryThreshold) If the attachment is greater than the threshold, it is written to the disk.void
setParseEagerly
(boolean parseEagerly) Sets whether message should be parsed eagerly.void
validate()
Validates if it can create temporary files.
-
Field Details
-
DEFAULT_CHUNK_SIZE
private static final int DEFAULT_CHUNK_SIZE- See Also:
-
DEFAULT_MEMORY_THRESHOLD
private static final long DEFAULT_MEMORY_THRESHOLD- See Also:
-
DEFAULT_FILE_PREFIX
- See Also:
-
LOGGER
-
parseEagerly
boolean parseEagerly -
chunkSize
int chunkSize -
memoryThreshold
long memoryThreshold -
tempDir
File tempDir -
prefix
String prefix -
suffix
String suffix
-
-
Constructor Details
-
MIMEConfig
-
MIMEConfig
public MIMEConfig()Create new MIMEConfig
-
-
Method Details
-
isParseEagerly
boolean isParseEagerly() -
setParseEagerly
public void setParseEagerly(boolean parseEagerly) Sets whether message should be parsed eagerly.- Parameters:
parseEagerly
- true if to parse eagerly
-
getChunkSize
int getChunkSize() -
setChunkSize
void setChunkSize(int chunkSize) -
getMemoryThreshold
long getMemoryThreshold() -
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
-
isOnlyMemory
boolean isOnlyMemory() -
getTempDir
File getTempDir() -
getTempFilePrefix
String getTempFilePrefix() -
getTempFileSuffix
String getTempFileSuffix() -
setDir
- Parameters:
directory
- temp directory
-
validate
public void validate()Validates if it can create temporary files. Otherwise, it stores attachment contents in memory.
-