Class StringScriptResource
- java.lang.Object
-
- com.adobe.granite.ui.clientlibs.script.StringScriptResource
-
- All Implemented Interfaces:
ScriptResource
public class StringScriptResource extends Object implements ScriptResource
SimpleScriptResourcebased on strings.
-
-
Constructor Summary
Constructors Constructor Description StringScriptResource(String source, String name)Creates a simple script resource based on a string.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()Gets the name (path) of the resourceReadergetReader()Opens a reader to this resourcelonggetSize()Returns the size of this resource
-
-
-
Method Detail
-
getName
public String getName()
Gets the name (path) of the resource- Specified by:
getNamein interfaceScriptResource- Returns:
- the name
-
getReader
public Reader getReader() throws IOException
Opens a reader to this resource- Specified by:
getReaderin interfaceScriptResource- Returns:
- an open reader
- Throws:
IOException- if an error occurs
-
getSize
public long getSize()
Returns the size of this resource- Specified by:
getSizein interfaceScriptResource- Returns:
- the size or -1 if not known
-
-