Class StringScriptResource
- java.lang.Object
-
- com.adobe.granite.ui.clientlibs.script.StringScriptResource
-
- All Implemented Interfaces:
ScriptResource
public class StringScriptResource extends Object implements ScriptResource
SimpleScriptResource
based 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 String
getName()
Gets the name (path) of the resourceReader
getReader()
Opens a reader to this resourcelong
getSize()
Returns the size of this resource
-
-
-
Method Detail
-
getName
public String getName()
Gets the name (path) of the resource- Specified by:
getName
in interfaceScriptResource
- Returns:
- the name
-
getReader
public Reader getReader() throws IOException
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
-
-