如何记录棒棒糖下面的设备屏幕

时间:2015-09-03 05:12:40

标签: java android

我已使用此代码录制屏幕,但它正在创建大小为0kb的文件视频文件。

try {
        File file = new    File("filename");
        BufferedReader reader = new BufferedReader(new FileReader(file));
        String line = "", oldtext = "";
        while ((line = reader.readLine()) != null) {
            oldtext += line + "\r\n";
        }
        reader.close();
        // replace a word in a file
        String newtext = oldtext.replaceAll("%LOGSOURCE% >eth1 rule: 7;", "");
        String newtext1 = oldtext.replaceAll("rule_uid: {C1336766-9489-4049-9817-50584D83A245};", "");

     //To replace a line in a file
        FileWriter writer = new FileWriter("newfilename");
        writer.write(newtext);
        writer.write(newtext1);
        writer.close();
    } catch (IOException ioe) {
        ioe.printStackTrace();
    }
}

0 个答案:

没有答案