Integer() — netty Function Reference
Architecture documentation for the Integer() function in NetUtil.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD c2e9d0e2_b1c8_ec6b_17db_f1e9120ac661["Integer()"] 40fb3f7d_c2dd_316b_f965_bdef8e0dad94["NetUtil"] c2e9d0e2_b1c8_ec6b_17db_f1e9120ac661 -->|defined in| 40fb3f7d_c2dd_316b_f965_bdef8e0dad94 style c2e9d0e2_b1c8_ec6b_17db_f1e9120ac661 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
common/src/main/java/io/netty/util/NetUtil.java lines 235–258
private static Integer sysctlGetInt(String sysctlKey) throws IOException {
Process process = new ProcessBuilder("sysctl", sysctlKey).start();
try {
// Suppress warnings about resource leaks since the buffered reader is closed below
InputStream is = process.getInputStream();
InputStreamReader isr = new InputStreamReader(new BoundedInputStream(is));
try (BufferedReader br = new BufferedReader(isr)) {
String line = br.readLine();
if (line != null && line.startsWith(sysctlKey)) {
for (int i = line.length() - 1; i > sysctlKey.length(); --i) {
if (!Character.isDigit(line.charAt(i))) {
return Integer.valueOf(line.substring(i + 1));
}
}
}
return null;
}
} finally {
// No need of 'null' check because we're initializing
// the Process instance in first line. Any exception
// raised will directly lead to throwable.
process.destroy();
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does Integer() do?
Integer() is a function in the netty codebase, defined in common/src/main/java/io/netty/util/NetUtil.java.
Where is Integer() defined?
Integer() is defined in common/src/main/java/io/netty/util/NetUtil.java at line 235.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free