Class StringScriptResource
java.lang.Object
com.adobe.granite.ui.clientlibs.script.StringScriptResource
- All Implemented Interfaces:
ScriptResource
Simple
ScriptResource
based on strings.-
Constructor Summary
ConstructorsConstructorDescriptionStringScriptResource
(String source, String name) Creates a simple script resource based on a string. -
Method Summary
-
Constructor Details
-
StringScriptResource
Creates a simple script resource based on a string.- Parameters:
source
- The source codename
- the name of this source
-
-
Method Details
-
getName
Gets the name (path) of the resource- Specified by:
getName
in interfaceScriptResource
- Returns:
- the name
-
getReader
Opens a reader to this resource- Specified by:
getReader
in interfaceScriptResource
- Returns:
- an open reader
- Throws:
IOException
- if an error occurs
-
getSize
public long getSize()Returns the size of this resource- Specified by:
getSize
in interfaceScriptResource
- Returns:
- the size or -1 if not known
-