private boolean parse(final InputStream input,
final boolean isCaseInsensitive, final boolean includeHeaders,
final CharBuffer buffer) throws IOException, MimeException {
try {
boolean result = false;
MimeConfig config = new MimeConfig();
config.setMaxLineLen(-1);
config.setMaxHeaderLen(-1);
MimeTokenStream parser = new MimeTokenStream(config); parser.parse(input);
while (!result && parser.next() != EntityState.T_END_OF_STREAM) {
final EntityState state = parser.getState();
switch (state) {