类 MimeConfig

java.lang.Object
com.sh.mail.mime4j.stream.MimeConfig
所有已实现的接口:
Cloneable

public final class MimeConfig extends Object implements Cloneable

Description:

Title:首亨软件 - TSS/CRM等

从以下版本开始:
Aug 16, 2012
  • 构造器详细资料

    • 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 - true to 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). false to 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 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.

      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 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.

      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 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.

      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 a MimeException if 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 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.

      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

      public String 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

      public void setHeadlessParsing(String contentType)
      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

      public MimeConfig clone()
      覆盖:
      clone 在类中 Object
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object