public static MagnetOptions[] parseMagnets(String magnets){
  List<MagnetOptions> list=new ArrayList<MagnetOptions>();
  StringTokenizer tokens=new StringTokenizer(magnets,System.getProperty("line.separator"));
  while (tokens.hasMoreTokens()) {
    String next=tokens.nextToken();
    MagnetOptions[] options=MagnetOptions.parseMagnet(next);
    if (options.length > 0) {
      list.addAll(Arrays.asList(options));
    }
  }
  return list.toArray(new MagnetOptions[0]);
}

public static MagnetOptions [ ] parseMagnets ( String magnets ) { List < MagnetOptions > list = new ArrayList < MagnetOptions > ( ) ; StringTokenizer tokens = new StringTokenizer ( magnets , System . getProperty ( "line.separator" ) ) ; while ( tokens . hasMoreTokens ( ) ) { String next = tokens . nextToken ( ) ; MagnetOptions [ ] options = MagnetOptions . parseMagnet ( next ) ; if ( options . length > 0 ) { list . addAll ( Arrays . asList ( options ) ) ; } } return list . toArray ( new MagnetOptions [ 0 ] ) ; }
allows multiline parsing of magnet links .
