org.jboss.shrinkwrap.api.asset
Class UrlAsset
java.lang.Object
org.jboss.shrinkwrap.api.asset.UrlAsset
- All Implemented Interfaces:
- Asset
public class UrlAsset
- extends Object
- implements Asset
Implementation of an Asset
backed by a URL
.
The URL may be of any backing protocol supported by the runtime
(ie. has a handler registered).
- Author:
- Aslak Knutsen
Constructor Summary |
UrlAsset(URL url)
Create a new resource with a URL source. |
UrlAsset
public UrlAsset(URL url)
- Create a new resource with a
URL
source.
- Parameters:
url
- A valid URL
- Throws:
IllegalArgumentException
- URL
can not be null
openStream
public InputStream openStream()
- Open the
URL
stream.
- Specified by:
openStream
in interface Asset
- Returns:
- A open stream with the content of the URL
toString
public String toString()
-
- Overrides:
toString
in class Object
- See Also:
Object.toString()
Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.