Constructor and Description |
---|
MimeConfig() |
Modifier and Type | Method and Description |
---|---|
MimeConfig |
clone() |
String |
getHeadlessParsing()
Returns the value of the default content type.
|
long |
getMaxContentLen()
Returns the maximum content length limit
|
int |
getMaxHeaderCount()
Returns the maximum header limit
|
int |
getMaxHeaderLen()
Returns the maximum header length limit
|
int |
getMaxLineLen()
Returns the maximum line length limit
|
boolean |
isCountLineNumbers()
Returns the value of the line number counting mode.
|
boolean |
isMalformedHeaderStartsBody() |
boolean |
isStrictParsing()
Returns the value of the strict parsing mode
|
void |
setCountLineNumbers(boolean countLineNumbers)
Defines whether the parser should count line numbers.
|
void |
setHeadlessParsing(String contentType)
Defines a default content type.
|
void |
setMalformedHeaderStartsBody(boolean malformedHeaderStartsBody)
Define the behaviour for dealing with malformed headers while in lenient
mode
|
void |
setMaxContentLen(long maxContentLen)
Sets the maximum content length limit.
|
void |
setMaxHeaderCount(int maxHeaderCount)
Sets the maximum header limit.
|
void |
setMaxHeaderLen(int maxHeaderLen)
Sets the maximum header length limit.
|
void |
setMaxLineLen(int maxLineLen)
Sets the maximum line length limit.
|
void |
setStrictParsing(boolean strictParsing)
Defines whether minor violations of the MIME specification should be
tolerated or should result in a
MimeException . |
String |
toString() |
public boolean isMalformedHeaderStartsBody()
setMalformedHeaderStartsBody(boolean)
public void setMalformedHeaderStartsBody(boolean malformedHeaderStartsBody)
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.public boolean isStrictParsing()
setStrictParsing(boolean)
public void setStrictParsing(boolean strictParsing)
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 modepublic int getMaxLineLen()
setMaxLineLen(int)
public void setMaxLineLen(int maxLineLen)
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 limitpublic int getMaxHeaderCount()
setMaxHeaderCount(int)
public void setMaxHeaderCount(int maxHeaderCount)
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 limitpublic int getMaxHeaderLen()
setMaxHeaderLen(int)
public void setMaxHeaderLen(int maxHeaderLen)
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 limitpublic long getMaxContentLen()
setMaxContentLen(long)
public void setMaxContentLen(long maxContentLen)
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 limitpublic boolean isCountLineNumbers()
public void setCountLineNumbers(boolean countLineNumbers)
Default value: false
countLineNumbers
- value of the line number counting mode.public String getHeadlessParsing()
MimeStreamParser.parse(java.io.InputStream)
public void setHeadlessParsing(String contentType)
Default value: null
contentType
- value of the default content type when parsing headless, null
otherwiseMimeStreamParser.parse(java.io.InputStream)
public MimeConfig clone()
Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.