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:
getNamein interfaceScriptResource- Returns:
- the name
-
getReader
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
-