public void addItem ( String term , Integer offsetStart , Integer offsetEnd , Integer posIncr , BytesRef payload , Integer flags ) { if ( ! closed ) { tokenNumber ++ ; MtasUpdateRequestProcessorResultItem item = new MtasUpdateRequestProcessorResultItem ( term , offsetStart , offsetEnd , posIncr , payload , flags ) ; try { objectOutputStream . writeObject ( item ) ; objectOutputStream . reset ( ) ; objectOutputStream . flush ( ) ; } catch ( IOException e ) { forceCloseAndDelete ( ) ; log . debug ( e ) ; } } }
Adds the item .