question: private BonjourEvent newBonjourEvent ( BonjourEvent . Type type , ServiceEvent event ) { ServiceInfo info = event . getInfo ( ) ; BonjourService . Builder serviceBuilder = new BonjourService . Builder ( event . getName ( ) , event . getType ( ) ) ; Enumeration < String > keys = info . getPropertyNames ( ) ; while ( keys . hasMoreElements ( ) ) { String key = keys . nextElement ( ) ; serviceBuilder . addTxtRecord ( key , info . getPropertyString ( key ) ) ; } InetAddress [ ] addresses = info . getInetAddresses ( ) ; for ( InetAddress address : addresses ) { if ( address == null ) continue ; serviceBuilder . addAddress ( address ) ; } serviceBuilder . setPort ( info . getPort ( ) ) ; return new BonjourEvent ( type , serviceBuilder . build ( ) ) ; }
target:  Creates a new BonjourEvent instance from a JmDNS ServiceEvent.