Code example for RandomAccessFile

Methods: closereadLine

0
 
    RandomAccessFile reader = null;
    String line = null;
 
    try { 
      reader = new RandomAccessFile("/proc/" + pid + "/stat", "r");
      line = reader.readLine();
    } catch (IOException ex) {
      Log.e("LinuxUtils", "Failed to read process stats", ex);
    } finally { 
      try { 
        reader.close();
      } catch (IOException e) {
        Log.e("LinuxUtils", "Failed to close stream");
      } 
    } 
 
    return line;
  } 
 
Connect your IDE to all the code out there  Get Codota for Java