Package org.jboss.shrinkwrap.api.asset
Class UrlAsset
- java.lang.Object
-
- org.jboss.shrinkwrap.api.asset.UrlAsset
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description URLgetSource()Returns the loaded URL.InputStreamopenStream()Open theURLstream.StringtoString()
-
-
-
Constructor Detail
-
UrlAsset
public UrlAsset(URL url)
Create a new resource with aURLsource.- Parameters:
url- A valid URL- Throws:
IllegalArgumentException-URLcan not be null
-
-
Method Detail
-
openStream
public InputStream openStream()
Open theURLstream.- Specified by:
openStreamin interfaceAsset- Returns:
- A open stream with the content of the URL
-
getSource
public URL getSource()
Returns the loaded URL.
-
toString
public String toString()
- Overrides:
toStringin classObject- See Also:
Object.toString()
-
-