Java tutorial
//package com.java2s; import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; public class Main { public static String[] GetMountLine(String PartitionName) { try { BufferedReader bProcFS = new BufferedReader(new FileReader("/proc/mounts")); String readLine = null; while ((readLine = bProcFS.readLine()) != null) { String[] args = readLine.split(" "); if ((args.length > 3) && (args[1].equalsIgnoreCase("/" + PartitionName))) { return args; } } } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return null; } }