public final class ProcMaps extends Object
| Modifier and Type | Method and Description |
|---|---|
List<Mapping> |
findAll(Predicate<? super Mapping> test)
Finds all memory mappings that match the given predicate.
|
Mapping |
findFirst(Predicate<? super Mapping> test)
Finds the first memory mapping that matches the given predicate.
|
static ProcMaps |
forPID(int pid)
Factory method to create a ProcMaps instance for a specified process ID (PID).
|
static ProcMaps |
forSelf()
Factory method to create a ProcMaps instance for the current process.
|
List<Mapping> |
list()
Returns an unmodifiable list of memory mappings.
|
public static ProcMaps forSelf() throws IOException
IOException - If an I/O error occurs reading from the /proc filesystem.public static ProcMaps forPID(int pid) throws IOException
pid - The process ID to read memory mappings for.IOException - If an I/O error occurs reading from the /proc filesystem.public List<Mapping> list()
public Mapping findFirst(Predicate<? super Mapping> test)
test - The predicate to test memory mappings.Copyright © 2024. All rights reserved.