content-parser/impl-text/src/main/java/net/sf/mmm/content/parser/impl/text/AbstractContentParserText.java
/**
   * This method parses the content of the given <code>bufferedReader</code> and
   * appends the textual content to the <code>textBuffer</code>. Additional
   * metadata can directly be set in the given <code>properties</code>.
   * 
   * @param bufferedReader is where to read the content from.
   * @param options are the {@link ContentParserOptions}.
   * @param context is where the metadata is collected.
   * @param textBuffer is the buffer where the textual content should be
   *        appended to.
   * @throws Exception if something goes wrong.
   */
This method parses the content of the given bufferedReader and
appends the textual content to the textBuffer. Additional
metadata can directly be set in the given properties.

@param bufferedReader is where to read the content from.
@param options are the  ContentParserOptions.
@param context is where the metadata is collected.
@param textBuffer is the buffer where the textual content should be
appended to.
@throws Exception if something goes wrong.
This method parses the content of the given bufferedReader and appends the textual content to the textBuffer . Additional metadata can directly be set in the given properties . @param bufferedReader is where to read the content from . @param options are the ContentParserOptions . @param context is where the metadata is collected . @param textBuffer is the buffer where the textual content should be appended to . @throws Exception if something goes wrong .
public void parse(BufferedReader bufferedReader, ContentParserOptions options,
      MutableGenericContext context, StringBuilder textBuffer) throws Exception {
    int maxChars = options.getMaximumBufferSize() / 2;
    int charCount = 0;
    String line = bufferedReader.readLine();
    while (line != null) {
      int len = line.length();
      charCount += len;
      if (charCount > maxChars) {
        getLogger().debug("maximum buffer size reached, content truncated.");
        break;
      }
      if ((len > 8) || (line.trim().length() > 0)) {
        textBuffer.append(line);
        textBuffer.append('\n');
      }
      line = bufferedReader.readLine();
    }
  }
public void parse ( BufferedReader bufferedReader , ContentParserOptions options , MutableGenericContext context , StringBuilder textBuffer ) throws Exception { int maxChars = options . getMaximumBufferSize ( ) / 2 ; int charCount = 0 ; String line = bufferedReader . readLine ( ) ; while ( line != null ) { int len = line . length ( ) ; charCount += len ; if ( charCount > maxChars ) { getLogger ( ) . debug ( "maximum buffer size reached, content truncated." ) ; break ; } if ( ( len > 8 ) || ( line . trim ( ) . length ( ) > 0 ) ) { textBuffer . append ( line ) ; textBuffer . append ( '\n' ) ; } line = bufferedReader . readLine ( ) ; } }
This method parses the content of the given <code>bufferedReader</code> and
 appends the textual content to the <code>textBuffer</code>.
This method parses the content of the given <code > bufferedReader< / code > and appends the textual content to the <code > textBuffer< / code > .
// omit empty lines...