private boolean processChar ( char c ) { if ( inTextArea ) { if ( c == TrimFilterWriter . textarea_close [ readCharMatchCount ] || c == TrimFilterWriter . TEXTAREA_CLOSE [ readCharMatchCount ] ) { readCharMatchCount ++ ; if ( readCharMatchCount >= TrimFilterWriter . textarea_close . length ) { inTextArea = false ; readCharMatchCount = 0 ; } } else { readCharMatchCount = 0 ; } return true ; } else if ( inPre ) { if ( c == TrimFilterWriter . pre_close [ preReadCharMatchCount ] || c == TrimFilterWriter . PRE_CLOSE [ preReadCharMatchCount ] ) { preReadCharMatchCount ++ ; if ( preReadCharMatchCount >= TrimFilterWriter . pre_close . length ) { inPre = false ; preReadCharMatchCount = 0 ; } } else { preReadCharMatchCount = 0 ; } return true ; } else { if ( c == ' ' ) { readCharMatchCount = 0 ; preReadCharMatchCount = 0 ; // Carriage return only output when no longer at the beginning of the line return ! atLineStart ; } else if ( c == ' ' ) { readCharMatchCount = 0 ; preReadCharMatchCount = 0 ; // Newline only output when no longer at the beginning of the line if ( ! atLineStart ) { atLineStart = true ; return true ; } else { return false ; } } else if ( c == ' ' || c == ' ' ) { readCharMatchCount = 0 ; preReadCharMatchCount = 0 ; // Space and tab only output when no longer at the beginning of the line return ! atLineStart ; } else { atLineStart = false ; if ( c == TrimFilterWriter . textarea [ readCharMatchCount ] || c == TrimFilterWriter . TEXTAREA [ readCharMatchCount ] ) { readCharMatchCount ++ ; if ( readCharMatchCount >= TrimFilterWriter . textarea . length ) { inTextArea = true ; readCharMatchCount = 0 ; } } else { readCharMatchCount = 0 ; } if ( c == TrimFilterWriter . pre [ preReadCharMatchCount ] || c == TrimFilterWriter . PRE [ preReadCharMatchCount ] ) { preReadCharMatchCount ++ ; if ( preReadCharMatchCount >= TrimFilterWriter . pre . length ) { inPre = true ; preReadCharMatchCount = 0 ; } } else { preReadCharMatchCount = 0 ; } return true ; } } }
Processes one character and returns true if the character should be outputted .