Code example for InputStreamReader

Methods: close

0
        } 
    } 
 
    private static void processTraces(File tracesFile, File pingFile) {
        try { 
            Reader traces = new InputStreamReader(
                new FileInputStream(tracesFile), TRACES_CHARSET);
            try { 
                processTraces(traces, pingFile);
            } finally { 
                traces.close();
            } 
        } catch (IOException e) {
            Log.w(LOGTAG, e);
        } 
    } 
 
    @Override 
    public void onReceive(Context context, Intent intent) {
        if (mPendingANR) {
            // we already processed an ANR without getting unstuck; skip this one