Created
August 13, 2012 14:00
-
-
Save tremes/3341009 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Command(value="url") | |
public void url(@Option(required=true) final Resource<?>[] urls, PipeOut out) throws IOException, URISyntaxException | |
{ | |
for (Resource<?> url : urls) | |
{ | |
out.println(url.getName()); | |
if (url instanceof URLResource) | |
{ | |
Desktop dt = Desktop.getDesktop(); | |
out.println("SUPPORTED"); | |
dt.browse(((URLResource) url).getUnderlyingResourceObject().toURI()); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment