code: 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 '\r':
              case '\n':
              {
                 ++offset;
                 break;
              }
  
              case '}':
              {
                 offset = -1;
                 finished = true;
                 break;
              }
  
              default:
              {
                 finished = true;
                 break;
              }
           }
        }
  
        return (offset);
     }
docs: 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.
  
  @param text RTF document test
  @param offset offset into the RTF document
  @return new offset