public class StringResource extends Object implements Resource
This implementation is intended to represent small text blocks.
This resource is immutable and can be cached based on object identity.
| Constructor and Description |
|---|
StringResource(String string)
Creates a resource based on String content.
|
StringResource(String string,
String description)
Creates a resource based on String content.
|
public StringResource(String string)
string - resource content.public Reader open() throws IOException
ResourceThe returned reader implementation should be effective enough to allow usage without extra buffering, etc.
open in interface ResourceIOException - if I/O error occurs.public String getString()
Copyright © 2006-2012. All Rights Reserved.