public enum MappedFileUtil extends Enum<MappedFileUtil>
NOTE: This utility is designed to work on Linux or Linux-like environments.
| Modifier and Type | Method and Description |
|---|---|
static String |
getAddress(Matcher matcher)
Gets the memory address range from the provided Matcher object.
|
static Set<String> |
getAllMappedFiles()
Get the distinct files that are currently mapped to the current process
|
static @Nullable String |
getPath(Matcher matcher)
Gets the path (if any) from the provided Matcher object.
|
static Matcher |
parseMapsLine(String line)
Parses the provided line using the pattern defined for parsing lines from "/proc/self/maps".
|
static MappedFileUtil |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MappedFileUtil[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static MappedFileUtil[] values()
for (MappedFileUtil c : MappedFileUtil.values()) System.out.println(c);
public static MappedFileUtil valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static Set<String> getAllMappedFiles()
NOTE: this is only likely to work on linux or linux-like environments
UnsupportedOperationException - if /proc/self/maps does not exist or can't be readpublic static Matcher parseMapsLine(String line)
line - The line to be parsed@Nullable public static @Nullable String getPath(Matcher matcher)
matcher - Matcher object containing the parsed lineCopyright © 2024. All rights reserved.