Class MIMEConfig


  • public class MIMEConfig
    extends java.lang.Object
    Configuration for MIME message parsing and storing.
    • Field Detail

      • DEFAULT_MEMORY_THRESHOLD

        private static final long DEFAULT_MEMORY_THRESHOLD
        See Also:
        Constant Field Values
      • DEFAULT_FILE_PREFIX

        private static final java.lang.String DEFAULT_FILE_PREFIX
        See Also:
        Constant Field Values
      • LOGGER

        private static final java.util.logging.Logger LOGGER
      • parseEagerly

        boolean parseEagerly
      • chunkSize

        int chunkSize
      • memoryThreshold

        long memoryThreshold
      • tempDir

        java.io.File tempDir
      • prefix

        java.lang.String prefix
      • suffix

        java.lang.String suffix
    • Constructor Detail

      • MIMEConfig

        private MIMEConfig​(boolean parseEagerly,
                           int chunkSize,
                           long inMemoryThreshold,
                           java.lang.String dir,
                           java.lang.String prefix,
                           java.lang.String suffix)
      • MIMEConfig

        public MIMEConfig()
    • Method Detail

      • isParseEagerly

        boolean isParseEagerly()
      • setParseEagerly

        public void setParseEagerly​(boolean parseEagerly)
      • 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

        java.io.File getTempDir()
      • getTempFilePrefix

        java.lang.String getTempFilePrefix()
      • getTempFileSuffix

        java.lang.String getTempFileSuffix()
      • setDir

        public final void setDir​(java.lang.String directory)
        Parameters:
        directory - temp directory
      • validate

        public void validate()
        Validates if it can create temporary files. Otherwise, it stores attachment contents in memory.