Code example for Writer

Methods: flush, write

0
 
    // Write the ps mediaserver mOutput to the file 
    public void getMemoryLog() throws Exception { 
        String memusage = null;
        memusage = captureMemInfo();
        mOutput.write(memusage);
        mOutput.flush();
    } 
 
    public void getMemorySummary() throws Exception { 
        int endMemory = 0;
        int memDiff = 0;
 
        endMemory = getVsize();
        memDiff = endMemory - mStartMemory;
 
        mOutput.write("End Memory :" + endMemory + "\n");
        if (memDiff < 0) {
            memDiff = 0;
        } 
        mOutput.write(mTestName + " total diff = " + memDiff);