public static List < List < RTFEmbeddedObject > > getEmbeddedObjects ( String text ) { List < List < RTFEmbeddedObject >> objects = null ; List < RTFEmbeddedObject > objectData ; int offset = text . indexOf ( OBJDATA ) ; if ( offset != - 1 ) { objects = new LinkedList < List < RTFEmbeddedObject > > ( ) ; while ( offset != - 1 ) { objectData = new LinkedList < RTFEmbeddedObject > ( ) ; objects . add ( objectData ) ; offset = readObjectData ( offset , text , objectData ) ; offset = text . indexOf ( OBJDATA , offset ) ; } } return ( objects ) ; }
This method generates a list of lists . Each list represents the data for an embedded object and contains set set of RTFEmbeddedObject instances that make up the embedded object . This method will return null if there are no embedded objects in the RTF document .