Package org.jboss.shrinkwrap.api.asset
Class StringAsset
- java.lang.Object
-
- org.jboss.shrinkwrap.api.asset.StringAsset
-
-
Constructor Summary
Constructors Constructor Description StringAsset(String content)
Creates a newAsset
instance backed by the specified String
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getSource()
Returns the underlying content.InputStream
openStream()
Get a input stream for the resource content.String
toString()
-
-
-
Constructor Detail
-
StringAsset
public StringAsset(String content)
Creates a newAsset
instance backed by the specified String- Parameters:
content
- The content represented as a String- Throws:
IllegalArgumentException
- If the contents were not specified
-
-
Method Detail
-
openStream
public InputStream openStream()
Description copied from interface:Asset
Get a input stream for the resource content. The caller is responsible for closing the stream.- Specified by:
openStream
in interfaceAsset
- Returns:
- A new open
InputStream
for each call - See Also:
Asset.openStream()
-
getSource
public String getSource()
Returns the underlying content.
-
toString
public String toString()
- Overrides:
toString
in classObject
- See Also:
Object.toString()
-
-