Class PEUtil
- java.lang.Object
-
- jetbrains.buildServer.util.PEReader.PEUtil
-
public class PEUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description PEUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PEVersion
getFileVersion(File peFile)
Extracts file version from portable executable's resources.static PEVersion
getProductVersion(File peFile)
Extracts product version from portable executable's resources.static boolean
is64Bit(File peFile)
Detects whether executable is 64-bit.
-
-
-
Method Detail
-
getProductVersion
@Nullable public static PEVersion getProductVersion(@NotNull File peFile)
Extracts product version from portable executable's resources. Pure Java version, no native code involved- Parameters:
peFile
- inspected exe file path- Returns:
- product version of peFile or null in case of any exception or absence of required resource
-
is64Bit
public static boolean is64Bit(@NotNull File peFile)
Detects whether executable is 64-bit. If unsure or error returns false Pure Java version, no native code involved- Parameters:
peFile
- inspected exe file path- Returns:
- true if 64-bit PE (PE32+), false otherwise
-
getFileVersion
@Nullable public static PEVersion getFileVersion(@NotNull File peFile)
Extracts file version from portable executable's resources. Pure Java version, no native code involved- Parameters:
peFile
- inspected exe file path- Returns:
- file version of peFile or null in case of any exception or absence of required resource
-
-