I'm working on a java code where it takes a URI as a parameter, but I'm not quite sure what the URI type data looks like. So far, I've tried these things to try get it working:
- Passing through normal URL in the parameter with&without speechmarks
- Trying to declare a variable above, which would have parsed a string URL to a URI
- Copy & pasting trial and error of different SOF answers I found
Can someone post examples of what type of parameters I may pass from this code below? Or how to solve this problem?
private List<SearchExtract> extractFrom(URI uri) throws IOException {
Document doc = Jsoup.parse(uri.toURL(), 5000);
Elements select = doc.select(".rc");
return Collections.singletonList(new SearchExtract(URI.create(""), ""));
}
Sorry if I was quite vague with the problem, I'm confused myself what to do.