public Message copy ( boolean copy_buffer , short starting_id , short ... copy_only_ids ) { Message retval = copy ( copy_buffer , false ) ; for ( Map . Entry < Short , Header > entry : getHeaders ( ) . entrySet ( ) ) { short id = entry . getKey ( ) ; if ( id >= starting_id || Util . containsId ( id , copy_only_ids ) ) retval . putHeader ( id , entry . getValue ( ) ) ; } return retval ; }
Copies a message . Copies only headers with IDs > = starting_id or IDs which are in the copy_only_ids list