private void setTaskNotes ( Task task , byte [ ] data , ExtendedData taskExtData , FixDeferFix taskVarData ) { String notes = taskExtData . getString ( TASK_NOTES ) ; if ( notes == null && data . length == 366 ) { byte [ ] offsetData = taskVarData . getByteArray ( getOffset ( data , 362 ) ) ; if ( offsetData != null && offsetData . length >= 12 ) { notes = taskVarData . getString ( getOffset ( offsetData , 8 ) ) ; // We do pick up some random stuff with this approach, and // we don't know enough about the file format to know when to ignore it // so we'll use a heuristic here to ignore anything that // doesn't look like RTF. if ( notes != null && notes . indexOf ( ' ' ) == - 1 ) { notes = null ; } } } if ( notes != null ) { if ( m_reader . getPreserveNoteFormatting ( ) == false ) { notes = RtfHelper . strip ( notes ) ; } task . setNotes ( notes ) ; } }
There appear to be two ways of representing task notes in an MPP8 file . This method tries to determine which has been used .