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