Package org.apache.james.mime4j.stream
Class MimeConfig
- java.lang.Object
-
- org.apache.james.mime4j.stream.MimeConfig
-
public final class MimeConfig extends 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 static MimeConfig
DEFAULT
static MimeConfig
PERMISSIVE
static MimeConfig
STRICT
-
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()
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 modeString
toString()
-
-
-
Field Detail
-
PERMISSIVE
public static final MimeConfig PERMISSIVE
-
DEFAULT
public static final MimeConfig DEFAULT
-
STRICT
public static final MimeConfig STRICT
-
-
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 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)
-
custom
public static MimeConfig.Builder custom()
-
copy
public static MimeConfig.Builder copy(MimeConfig config)
-
-