Package org.apache.james.mime4j.stream
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 boolean
static final MimeConfig
private final String
private final boolean
private final long
private final int
private final int
private final int
static final MimeConfig
static final MimeConfig
private 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.Builder
copy
(MimeConfig config) static MimeConfig.Builder
custom()
Returns the value of the default content type.long
Returns the maximum content length limitint
Returns the maximum header limitint
Returns the maximum header length limitint
Returns the maximum line length limitboolean
Returns the value of the line number counting mode.boolean
boolean
Returns 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
-