public interface ContentParserOptions
ContentParser
.ContentParser.parse(java.io.InputStream, long, ContentParserOptions)
,
ContentParserOptionsBean
Modifier and Type | Field and Description |
---|---|
static int |
MAXIMUM_BUFFER_SIZE_DEFAULT
The default maximum is 1 MB.
|
Modifier and Type | Method and Description |
---|---|
String |
getEncoding()
This method gets the encoding used as fallback, if it can NOT be derived or
detected automatically.
|
int |
getMaximumBufferSize()
This method gets the maximum size used for buffers when parsing content.
|
boolean |
isDisableUtfDetection()
This method determines if the automatic detection of UTF-encodings
(unicode) shall be disabled.
|
static final int MAXIMUM_BUFFER_SIZE_DEFAULT
int getMaximumBufferSize()
char
s will use at least two bytes so e.g.
StringBuffer
s shall be allocated
with a capacity
at most
maxBytes/2
. Anyways the amount of memory allocated will
typically be at least twice a much as maxBytes
. E.g. a
StringBuilder
is created with a capacity
of maxBytes/2
then StringBuilder.toString()
may allocate another array of about that size. This is a legal behavior of
the ContentParser
. So if you want to limit your heap-size use a
reasonable lower value for maxBytes
. Please do NOT use values
lower than 1024 (You do NOT want to parse Word-Documents with J2ME on your
toaster, do you?).MAXIMUM_BUFFER_SIZE_DEFAULT
String getEncoding()
not disabled
. By default
UTF detection is enabled
and the encoding
is The default is
EncodingUtil.SYSTEM_DEFAULT_ENCODING
but
replaced by
EncodingUtil.ENCODING_ISO_8859_15
if
UTF-based.boolean isDisableUtfDetection()
encoding
. Otherwise it will be
treaded as fallback if textual files do not seem to be unicode (UTF).true
if unicode detection shall be disabled,
false
if enabled (default).Copyright © 2001–2016 mmm-Team. All rights reserved.