public List getOptions ( int code ) { if ( options == null ) return Collections . EMPTY_LIST ; List list = Collections . EMPTY_LIST ; for ( Iterator it = options . iterator ( ) ; it . hasNext ( ) ; ) { EDNSOption opt = ( EDNSOption ) it . next ( ) ; if ( opt . getCode ( ) == code ) { if ( list == Collections . EMPTY_LIST ) list = new ArrayList ( ) ; list . add ( opt ) ; } } return list ; }
Gets all options in the OPTRecord with a specific code . This returns a list of EDNSOptions .