FileDocCategorySizeDatePackage
StringSource.javaAPI DocAndroid 5.1 API1647Thu Mar 12 22:22:30 GMT 2015android.filterpacks.text

StringSource

public class StringSource extends android.filterfw.core.Filter
hide

Fields Summary
private String
mString
private android.filterfw.core.FrameFormat
mOutputFormat
Constructors Summary
public StringSource(String name)

        super(name);
    
Methods Summary
public voidprocess(android.filterfw.core.FilterContext env)

        Frame output = env.getFrameManager().newFrame(mOutputFormat);
        output.setObjectValue(mString);
        output.setTimestamp(Frame.TIMESTAMP_UNKNOWN);
        pushOutput("string", output);
        closeOutputPort("string");
    
public voidsetupPorts()

        mOutputFormat = ObjectFormat.fromClass(String.class, FrameFormat.TARGET_SIMPLE);
        addOutputPort("string", mOutputFormat);