类 MimeConfig
java.lang.Object
com.sh.mail.mime4j.stream.MimeConfig
- 所有已实现的接口:
Cloneable
Description:
Title:首亨软件 - TSS/CRM等
- 从以下版本开始:
- Aug 16, 2012
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明clone()Returns the value of the default content type.longReturns the maximum content length limitintReturns the maximum header limitintReturns the maximum header length limitintReturns the maximum line length limitbooleanReturns the value of the line number counting mode.booleanbooleanReturns the value of the strict parsing modevoidsetCountLineNumbers(boolean countLineNumbers) Defines whether the parser should count line numbers.voidsetHeadlessParsing(String contentType) Defines a default content type.voidsetMalformedHeaderStartsBody(boolean malformedHeaderStartsBody) Define the behaviour for dealing with malformed headers while in lenient modevoidsetMaxContentLen(long maxContentLen) Sets the maximum content length limit.voidsetMaxHeaderCount(int maxHeaderCount) Sets the maximum header limit.voidsetMaxHeaderLen(int maxHeaderLen) Sets the maximum header length limit.voidsetMaxLineLen(int maxLineLen) Sets the maximum line length limit.voidsetStrictParsing(boolean strictParsing) Defines whether minor violations of the MIME specification should be tolerated or should result in aMimeException.toString()
-
构造器详细资料
-
MimeConfig
public MimeConfig()
-
-
方法详细资料
-
isMalformedHeaderStartsBody
public boolean isMalformedHeaderStartsBody()- 返回:
- true if malformed header should "end" the headers and be part of the body
- 另请参阅:
-
setMalformedHeaderStartsBody
public void setMalformedHeaderStartsBody(boolean malformedHeaderStartsBody) Define the behaviour for dealing with malformed headers while in lenient mode- 参数:
malformedHeaderStartsBody-trueto make the parser interpret a malformed header as end of the headers and as part of the body (as if the CRLF separator was missing).falseto simply ignore malformed headers and continue parsing headers from the following line.
-
isStrictParsing
public boolean isStrictParsing()Returns the value of the strict parsing mode- 返回:
- value of the strict parsing mode
- 另请参阅:
-
setStrictParsing
public void setStrictParsing(boolean strictParsing) Defines whether minor violations of the MIME specification should be tolerated or should result in aMimeException. If this parameter is set totrue, a strict interpretation of the MIME specification will be enforced, If this parameter is set tofalseminor violations will result in a warning in the log.Default value:
false- 参数:
strictParsing- value of the strict parsing mode
-
getMaxLineLen
public int getMaxLineLen()Returns the maximum line length limit- 返回:
- value of the the maximum line length limit
- 另请参阅:
-
setMaxLineLen
public void setMaxLineLen(int maxLineLen) Sets the maximum line length limit. Parsing of a MIME entity will be terminated with aMimeExceptionif 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.Default value:
1000- 参数:
maxLineLen- maximum line length limit
-
getMaxHeaderCount
public int getMaxHeaderCount()Returns the maximum header limit- 返回:
- value of the the maximum header limit
- 另请参阅:
-
setMaxHeaderCount
public void setMaxHeaderCount(int maxHeaderCount) Sets the maximum header limit. Parsing of a MIME entity will be terminated with aMimeExceptionif 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.Default value:
1000- 参数:
maxHeaderCount- maximum header limit
-
getMaxHeaderLen
public int getMaxHeaderLen()Returns the maximum header length limit- 返回:
- value of the maximum header length limit
- 另请参阅:
-
setMaxHeaderLen
public void setMaxHeaderLen(int maxHeaderLen) Sets the maximum header length limit. Parsing of a MIME entity will be terminated with aMimeExceptionif the total length of a header exceeds this limit. If this parameter is set to a non positive value the header length check will be disabled.A message header may be folded across multiple lines. This configuration parameter is used to limit the total length of a header, i.e. the sum of the length of all lines the header spans across (including line terminators).
Default value:
10000- 参数:
maxHeaderLen- maximum header length limit
-
getMaxContentLen
public long getMaxContentLen()Returns the maximum content length limit- 返回:
- value of the the maximum content length limit
- 另请参阅:
-
setMaxContentLen
public void setMaxContentLen(long maxContentLen) Sets the maximum content length limit. Parsing of a MIME entity will be terminated with aMimeExceptionif 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.Default value:
-1- 参数:
maxContentLen- maximum content length limit
-
isCountLineNumbers
public boolean isCountLineNumbers()Returns the value of the line number counting mode.- 返回:
- value of the line number counting mode.
-
setCountLineNumbers
public void setCountLineNumbers(boolean countLineNumbers) Defines whether the parser should count line numbers. If enabled line numbers are included in the debug output.Default value:
false- 参数:
countLineNumbers- value of the line number counting mode.
-
getHeadlessParsing
Returns the value of the default content type. When not null, indicates that the parsing should be headless.- 返回:
- default content type when parsing headless, null otherwise org.apache.james.mime4j.parser.MimeStreamParser#parse(java.io.InputStream)
-
setHeadlessParsing
Defines a default content type. When not null, indicates that the parsing should be headless.Default value:
null- 参数:
contentType- value of the default content type when parsing headless, null otherwise org.apache.james.mime4j.parser.MimeStreamParser#parse(java.io.InputStream)
-
clone
-
toString
-