@Override public void processNewLines(String[] lines){
  for (  String line : lines) {
    if (line.startsWith("idx")) {
      continue;
    }
    if (line.contains("No such file")) {
      myIsFileMissing=true;
      return;
    }
    String[] values=line.split(LINE_SPLIT_REGEX);
    if (values.length < INDEX_OF_TX_BYTES) {
      continue;
    }
    try {
      int lineUid=Integer.parseInt(values[INDEX_OF_UID]);
      if (myUid == lineUid) {
        int tempRxBytes=Integer.parseInt(values[INDEX_OF_RX_BYTES]);
        int tempTxBytes=Integer.parseInt(values[INDEX_OF_TX_BYTES]);
        if (tempRxBytes < 0 || tempTxBytes < 0) {
          LOG.warning(String.format("Negative rxBytes %1$d and/or txBytes %2$d in %3$s",tempRxBytes,tempTxBytes,line));
          continue;
        }
        myRxBytes+=tempRxBytes;
        myTxBytes+=tempTxBytes;
      }
    }
 catch (    NumberFormatException e) {
      LOG.warning(String.format("Expected int value, instead got uid %1$s, rxBytes %2$s, txBytes %3$s in %4$s",values[INDEX_OF_UID],values[INDEX_OF_RX_BYTES],values[INDEX_OF_TX_BYTES],line));
    }
  }
}

@ Override public void processNewLines ( String [ ] lines ) { for ( String line : lines ) { if ( line . startsWith ( "idx" ) ) { continue ; } if ( line . contains ( "No such file" ) ) { myIsFileMissing = true ; return ; } String [ ] values = line . split ( LINE_SPLIT_REGEX ) ; if ( values . length < INDEX_OF_TX_BYTES ) { continue ; } try { int lineUid = Integer . parseInt ( values [ INDEX_OF_UID ] ) ; if ( myUid == lineUid ) { int tempRxBytes = Integer . parseInt ( values [ INDEX_OF_RX_BYTES ] ) ; int tempTxBytes = Integer . parseInt ( values [ INDEX_OF_TX_BYTES ] ) ; if ( tempRxBytes < 0 || tempTxBytes < 0 ) { LOG . warning ( String . format ( "Negative rxBytes %1$d and/or txBytes %2$d in %3$s" , tempRxBytes , tempTxBytes , line ) ) ; continue ; } myRxBytes += tempRxBytes ; myTxBytes += tempTxBytes ; } } catch ( NumberFormatException e ) { LOG . warning ( String . format ( "Expected int value, instead got uid %1$s, rxBytes %2$s, txBytes %3$s in %4$s" , values [ INDEX_OF_UID ] , values [ INDEX_OF_RX_BYTES ] , values [ INDEX_OF_TX_BYTES ] , line ) ) ; } } }
processes the stats line to sum up all network stats belonging to the uid .
