Here you can find the source of toURIList(Collection
public static List<URI> toURIList(Collection<String> stringList)
//package com.java2s; import java.net.URI; import java.util.*; public class Main { public static List<URI> toURIList(Collection<String> stringList) { List<URI> uriList = null; if (stringList != null && !stringList.isEmpty()) { uriList = new ArrayList<>(); for (String uriStr : stringList) { uriList.add(URI.create(uriStr)); }/*from w ww. jav a 2 s . co m*/ } return uriList; } }