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 URL
getSource()
Returns the loaded URL.InputStream
openStream()
Open theURL
stream.String
toString()
-
-
-
Constructor Detail
-
UrlAsset
public UrlAsset(URL url)
Create a new resource with aURL
source.- Parameters:
url
- A valid URL- Throws:
IllegalArgumentException
-URL
can not be null
-
-
Method Detail
-
openStream
public InputStream openStream()
Open theURL
stream.- Specified by:
openStream
in interfaceAsset
- Returns:
- A open stream with the content of the URL
-
getSource
public URL getSource()
Returns the loaded URL.
-
toString
public String toString()
- Overrides:
toString
in classObject
- See Also:
Object.toString()
-
-