FileDocCategorySizeDatePackage
GraphReader.javaAPI DocAndroid 5.1 API2277Thu Mar 12 22:22:30 GMT 2015android.filterfw.io

GraphReader

public abstract class GraphReader extends Object
hide

Fields Summary
protected android.filterfw.core.KeyValueMap
mReferences
Constructors Summary
Methods Summary
public voidaddReference(java.lang.String name, java.lang.Object object)

        mReferences.put(name, object);
    
public voidaddReferencesByKeysAndValues(java.lang.Object references)

        mReferences.setKeyValues(references);
    
public voidaddReferencesByMap(android.filterfw.core.KeyValueMap refs)

        mReferences.putAll(refs);
    
public android.filterfw.core.FilterGraphreadGraphResource(android.content.Context context, int resourceId)


          

          

            
        InputStream inputStream = context.getResources().openRawResource(resourceId);
        InputStreamReader reader = new InputStreamReader(inputStream);
        StringWriter writer = new StringWriter();
        char[] buffer = new char[1024];
        try {
            int bytesRead;
            while ((bytesRead = reader.read(buffer, 0, 1024)) > 0) {
                writer.write(buffer, 0, bytesRead);
            }
        } catch (IOException e) {
            throw new RuntimeException("Could not read specified resource file!");
        }
        return readGraphString(writer.toString());
    
public abstract android.filterfw.core.FilterGraphreadGraphString(java.lang.String graphString)

public abstract android.filterfw.core.KeyValueMapreadKeyValueAssignments(java.lang.String assignments)