public KeePassFile enrichNodesWithIconData ( KeePassFile keePassFile ) { CustomIcons iconLibrary = keePassFile . getMeta ( ) . getCustomIcons ( ) ; GroupZipper zipper = new GroupZipper ( keePassFile ) ; Iterator < Group > iter = zipper . iterator ( ) ; while ( iter . hasNext ( ) ) { Group group = iter . next ( ) ; byte [ ] iconData = getIconData ( group . getCustomIconUuid ( ) , group . getIconId ( ) , iconLibrary ) ; Group groupWithIcon = new GroupBuilder ( group ) . iconData ( iconData ) . build ( ) ; zipper . replace ( groupWithIcon ) ; enrichEntriesWithIcons ( iconLibrary , group ) ; } return zipper . close ( ) ; }
Iterates through all nodes of the given KeePass file and replace the nodes with enriched icon data nodes .