Class StringAsset
java.lang.Object
org.jboss.shrinkwrap.api.asset.StringAsset
- All Implemented Interfaces:
Asset
-
Constructor Summary
ConstructorsConstructorDescriptionStringAsset(String content) Creates a newAssetinstance backed by the specified String -
Method Summary
Modifier and TypeMethodDescriptionReturns the underlying content.Get an input stream for the resource content.toString()
-
Constructor Details
-
StringAsset
Creates a newAssetinstance backed by the specified String- Parameters:
content- The content represented as a String- Throws:
IllegalArgumentException- If the contents were not specified
-
-
Method Details
-
openStream
Description copied from interface:AssetGet an 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:
-
getSource
Returns the underlying content. -
toString
-