com.hunnysoft.jmime
Class Options

java.lang.Object
  extended by com.hunnysoft.jmime.Options

public class Options
extends java.lang.Object

Class that defines global options.

This class provides access to options that affect the behavior of the library. The options are global.

The default values are reasonable. However, if you need to change any values, it is recommended that you set the option values at application start-up time.


Constructor Summary
Options()
           
 
Method Summary
static int maxDepth()
          Gets the maximum depth of nested body parts for the parser.
static void setMaxDepth(int n)
          Sets the maximum depth of nested body parts for the parser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Options

public Options()
Method Detail

setMaxDepth

public static void setMaxDepth(int n)
Sets the maximum depth of nested body parts for the parser.

In order to avoid the possibility of a denial-of-service attack, Hunny JMIME limits the maximum depth of nested body parts that the parser will automatically parse. The default value is 5, which is enough for virtually all email messages. However, the option is configurable via this function.

Parameters:
n - the maximum depth value

maxDepth

public static int maxDepth()
Gets the maximum depth of nested body parts for the parser.

Returns:
the maximum depth value
See Also:
setMaxDepth(int)