Class MimeConfig
java.lang.Object
org.apache.james.mime4j.stream.MimeConfig
Properties used to configure the behavior of MIME stream parsers.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanstatic final MimeConfigprivate final Stringprivate final booleanprivate final longprivate final intprivate final intprivate final intstatic final MimeConfigstatic final MimeConfigprivate final boolean -
Constructor Summary
ConstructorsConstructorDescriptionMimeConfig(boolean strictParsing, int maxLineLen, int maxHeaderCount, int maxHeaderLen, long maxContentLen, boolean countLineNumbers, String headlessParsing, boolean malformedHeaderStartsBody) -
Method Summary
Modifier and TypeMethodDescriptionstatic MimeConfig.Buildercopy(MimeConfig config) static MimeConfig.Buildercustom()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 modetoString()
-
Field Details
-
PERMISSIVE
-
DEFAULT
-
STRICT
-
strictParsing
private final boolean strictParsing -
maxLineLen
private final int maxLineLen -
maxHeaderCount
private final int maxHeaderCount -
maxHeaderLen
private final int maxHeaderLen -
maxContentLen
private final long maxContentLen -
countLineNumbers
private final boolean countLineNumbers -
headlessParsing
-
malformedHeaderStartsBody
private final boolean malformedHeaderStartsBody
-
-
Constructor Details
-
MimeConfig
MimeConfig(boolean strictParsing, int maxLineLen, int maxHeaderCount, int maxHeaderLen, long maxContentLen, boolean countLineNumbers, String headlessParsing, boolean malformedHeaderStartsBody)
-
-
Method Details
-
isMalformedHeaderStartsBody
public boolean isMalformedHeaderStartsBody()- Returns:
- true if malformed header should "end" the headers and be part of the body
- See Also:
-
isStrictParsing
public boolean isStrictParsing()Returns the value of the strict parsing mode- Returns:
- value of the strict parsing mode
- See Also:
-
getMaxLineLen
public int getMaxLineLen()Returns the maximum line length limit- Returns:
- value of the the maximum line length limit
- See Also:
-
getMaxHeaderCount
public int getMaxHeaderCount()Returns the maximum header limit- Returns:
- value of the the maximum header limit
- See Also:
-
getMaxHeaderLen
public int getMaxHeaderLen()Returns the maximum header length limit- Returns:
- value of the maximum header length limit
- See Also:
-
getMaxContentLen
public long getMaxContentLen()Returns the maximum content length limit- Returns:
- value of the the maximum content length limit
- See Also:
-
isCountLineNumbers
public boolean isCountLineNumbers()Returns the value of the line number counting mode.- Returns:
- 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.- Returns:
- default content type when parsing headless, null otherwise
- See Also:
-
toString
-
custom
-
copy
-