private Net dump(int port) {
            InputStream is = null;
            BufferedReader reader = null;
            try {
                is = new FileInputStream(mArgs);
                reader = new BufferedReader(new InputStreamReader(is));
                long now = System.currentTimeMillis();
                while (System.currentTimeMillis() - now < MAX_DUMP_DURATION) {
                    String line;
                    try {
                        line = reader.readLine();
                    } catch (IOException e) {
                        continue;
                    }
                    if (line == null || TextUtils.isEmpty(line.trim())) {
                        continue;
                    }
                    Matcher matcher = mPattern.matcher(line);
                    while (matcher.find()) {
                        int uid = NetBareUtils.parseInt(matcher.group(6), -1);
                        if (uid <= 0) {
                            continue;
                        }
                        int localPort = parsePort(matcher.group(2));
                        if (localPort != port) {
                            continue;
                        }
                        String localIp = parseIp(matcher.group(1));
                        if (localIp == null || !localIp.equals(mLocalIp)) {
                            continue;
                        }
                        String remoteIp = parseIp(matcher.group(3));
                        int remotePort = parsePort(matcher.group(4));
                        return new Net(uid, localIp, localPort, remoteIp, remotePort);
                    }
                }
            } catch (IOException e) {
                // Ignore
            } finally {
                NetBareUtils.closeQuietly(is);
                NetBareUtils.closeQuietly(reader);
            }
            return null;
        }
A dumper analyzes /proc/net/ files to dump uid of the network session. This class may be a
battery-killer, but can set {@link NetBareConfig.Builder#dumpUid} to false to close the dumper.

@author Megatron King
@since 2018-12-03 16:54
netbare-core/src/main/java/com/github/megatronking/netbare/net/UidDumper.java