Class StringScriptResource
- java.lang.Object
-
- com.adobe.granite.ui.clientlibs.script.StringScriptResource
-
- All Implemented Interfaces:
ScriptResource
public class StringScriptResource extends java.lang.Object implements ScriptResource
SimpleScriptResource
based on strings.
-
-
Constructor Summary
Constructors Constructor Description StringScriptResource(java.lang.String source, java.lang.String name)
Creates a simple script resource based on a string.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
Gets the name (path) of the resourcejava.io.Reader
getReader()
Opens a reader to this resourcelong
getSize()
Returns the size of this resource
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Gets the name (path) of the resource- Specified by:
getName
in interfaceScriptResource
- Returns:
- the name
-
getReader
public java.io.Reader getReader() throws java.io.IOException
Opens a reader to this resource- Specified by:
getReader
in interfaceScriptResource
- Returns:
- an open reader
- Throws:
java.io.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
-
-