Package org.apache.james.mime4j.stream
Class MimeConfig
- java.lang.Object
-
- org.apache.james.mime4j.stream.MimeConfig
-
public final class MimeConfig extends java.lang.Object
Properties used to configure the behavior of MIME stream parsers.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MimeConfig.Builder
-
Field Summary
Fields Modifier and Type Field Description private boolean
countLineNumbers
static MimeConfig
DEFAULT
private java.lang.String
headlessParsing
private boolean
malformedHeaderStartsBody
private long
maxContentLen
private int
maxHeaderCount
private int
maxHeaderLen
private int
maxLineLen
static MimeConfig
PERMISSIVE
static MimeConfig
STRICT
private boolean
strictParsing
-
Constructor Summary
Constructors Constructor Description MimeConfig(boolean strictParsing, int maxLineLen, int maxHeaderCount, int maxHeaderLen, long maxContentLen, boolean countLineNumbers, java.lang.String headlessParsing, boolean malformedHeaderStartsBody)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MimeConfig.Builder
copy(MimeConfig config)
static MimeConfig.Builder
custom()
java.lang.String
getHeadlessParsing()
Returns the value of the default content type.long
getMaxContentLen()
Returns the maximum content length limitint
getMaxHeaderCount()
Returns the maximum header limitint
getMaxHeaderLen()
Returns the maximum header length limitint
getMaxLineLen()
Returns the maximum line length limitboolean
isCountLineNumbers()
Returns the value of the line number counting mode.boolean
isMalformedHeaderStartsBody()
boolean
isStrictParsing()
Returns the value of the strict parsing modejava.lang.String
toString()
-
-
-
Field Detail
-
PERMISSIVE
public static final MimeConfig PERMISSIVE
-
DEFAULT
public static final MimeConfig DEFAULT
-
STRICT
public static final MimeConfig 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
private final java.lang.String headlessParsing
-
malformedHeaderStartsBody
private final boolean malformedHeaderStartsBody
-
-
Method Detail
-
isMalformedHeaderStartsBody
public boolean isMalformedHeaderStartsBody()
- Returns:
- true if malformed header should "end" the headers and be part of the body
- See Also:
MimeConfig.Builder.setMalformedHeaderStartsBody(boolean)
-
isStrictParsing
public boolean isStrictParsing()
Returns the value of the strict parsing mode- Returns:
- value of the strict parsing mode
- See Also:
MimeConfig.Builder.setStrictParsing(boolean)
-
getMaxLineLen
public int getMaxLineLen()
Returns the maximum line length limit- Returns:
- value of the the maximum line length limit
- See Also:
MimeConfig.Builder.setMaxLineLen(int)
-
getMaxHeaderCount
public int getMaxHeaderCount()
Returns the maximum header limit- Returns:
- value of the the maximum header limit
- See Also:
MimeConfig.Builder.setMaxHeaderCount(int)
-
getMaxHeaderLen
public int getMaxHeaderLen()
Returns the maximum header length limit- Returns:
- value of the maximum header length limit
- See Also:
MimeConfig.Builder.setMaxHeaderLen(int)
-
getMaxContentLen
public long getMaxContentLen()
Returns the maximum content length limit- Returns:
- value of the the maximum content length limit
- See Also:
MimeConfig.Builder.setMaxContentLen(long)
-
isCountLineNumbers
public boolean isCountLineNumbers()
Returns the value of the line number counting mode.- Returns:
- value of the line number counting mode.
-
getHeadlessParsing
public java.lang.String 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:
MimeStreamParser.parse(java.io.InputStream)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
custom
public static MimeConfig.Builder custom()
-
copy
public static MimeConfig.Builder copy(MimeConfig config)
-
-