org.apache.james.mime4j.parser
Class MimeEntityConfig

java.lang.Object
  extended by org.apache.james.mime4j.parser.MimeEntityConfig
All Implemented Interfaces:
java.lang.Cloneable

public final class MimeEntityConfig
extends java.lang.Object
implements java.lang.Cloneable

MIME entity configuration


Constructor Summary
MimeEntityConfig()
           
 
Method Summary
 MimeEntityConfig clone()
           
 long getMaxContentLen()
          Returns the maximum content length limit
 int getMaxHeaderCount()
          Returns the maximum header limit
 int getMaxLineLen()
          Returns the maximum line length limit
 boolean isCountLineNumbers()
          Returns the value of the line number counting mode.
 boolean isMaximalBodyDescriptor()
           
 boolean isStrictParsing()
          Returns the value of the strict parsing mode
 void setCountLineNumbers(boolean countLineNumbers)
          Defines whether the parser should count line numbers.
 void setMaxContentLen(long maxContentLen)
          Sets the maximum content length limit.
 void setMaxHeaderCount(int maxHeaderCount)
          Sets the maximum header limit.
 void setMaximalBodyDescriptor(boolean maximalBodyDescriptor)
           
 void setMaxLineLen(int maxLineLen)
          Sets the maximum line length limit.
 void setStrictParsing(boolean strictParsing)
          Defines whether minor violations of the MIME specification should be tolerated or should result in a MimeException.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MimeEntityConfig

public MimeEntityConfig()
Method Detail

isMaximalBodyDescriptor

public boolean isMaximalBodyDescriptor()

setMaximalBodyDescriptor

public void setMaximalBodyDescriptor(boolean maximalBodyDescriptor)

setStrictParsing

public void setStrictParsing(boolean strictParsing)
Defines whether minor violations of the MIME specification should be tolerated or should result in a MimeException. If this parameter is set to true, a strict interpretation of the MIME specification will be enforced, If this parameter is set to false minor violations will result in a warning in the log.

Parameters:
strictParsing - value of the strict parsing mode

isStrictParsing

public boolean isStrictParsing()
Returns the value of the strict parsing mode

Returns:
value of the strict parsing mode
See Also:
setStrictParsing(boolean)

setMaxLineLen

public void setMaxLineLen(int maxLineLen)
Sets the maximum line length limit. Parsing of a MIME entity will be terminated with a MimeException if a line is encountered that exceeds the maximum length limit. If this parameter is set to a non positive value the line length check will be disabled.

Parameters:
maxLineLen - maximum line length limit

getMaxLineLen

public int getMaxLineLen()
Returns the maximum line length limit

Returns:
value of the the maximum line length limit
See Also:
setMaxLineLen(int)

setMaxHeaderCount

public void setMaxHeaderCount(int maxHeaderCount)
Sets the maximum header limit. Parsing of a MIME entity will be terminated with a MimeException if the number of headers exceeds the maximum limit. If this parameter is set to a non positive value the header limit check will be disabled.

Parameters:
maxHeaderCount - maximum header limit

getMaxHeaderCount

public int getMaxHeaderCount()
Returns the maximum header limit

Returns:
value of the the maximum header limit
See Also:
setMaxHeaderCount(int)

setMaxContentLen

public void setMaxContentLen(long maxContentLen)
Sets the maximum content length limit. Parsing of a MIME entity will be terminated with a MimeException if a content body exceeds the maximum length limit. If this parameter is set to a non positive value the content length check will be disabled.

Parameters:
maxContentLen - maximum content length limit

getMaxContentLen

public long getMaxContentLen()
Returns the maximum content length limit

Returns:
value of the the maximum content length limit
See Also:
setMaxContentLen(long)

setCountLineNumbers

public void setCountLineNumbers(boolean countLineNumbers)
Defines whether the parser should count line numbers. If enabled line numbers are included in the debug output.

Parameters:
countLineNumbers - value of the line number counting mode.

isCountLineNumbers

public boolean isCountLineNumbers()
Returns the value of the line number counting mode.

Returns:
value of the line number counting mode.

clone

public MimeEntityConfig clone()
Overrides:
clone in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.