private static int getBlockLength ( String text , int offset ) { int startIndex = offset ; boolean finished = false ; char c ; while ( finished == false ) { c = text . charAt ( offset ) ; switch ( c ) { case ' ' : case ' ' : case ' ' : { finished = true ; break ; } default : { ++ offset ; break ; } } } int length = offset - startIndex ; return ( length ) ; }
Calculates the length of the next block of RTF data .