private static int skipEndOfLine ( String text , int offset ) { char c ; boolean finished = false ; while ( finished == false ) { c = text . charAt ( offset ) ; switch ( c ) { case ' ' : // found that OBJDATA could be followed by a space the EOL case ' ' : case ' ' : { ++ offset ; break ; } case ' ' : { offset = - 1 ; finished = true ; break ; } default : { finished = true ; break ; } } } return ( offset ) ; }
This method skips the end - of - line markers in the RTF document . It also indicates if the end of the embedded object has been reached .