Class WindowsPeOptionalHeader.Builder
java.lang.Object
security.whisper.javastix.coo.types.WindowsPeOptionalHeader.Builder
- Enclosing class:
WindowsPeOptionalHeader
Builds instances of type
WindowsPeOptionalHeader.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionaddressOfEntryPoint(long addressOfEntryPoint) Initializes the optional valueaddressOfEntryPointto addressOfEntryPoint.addressOfEntryPoint(Optional<Long> addressOfEntryPoint) Initializes the optional valueaddressOfEntryPointto addressOfEntryPoint.baseOfCode(long baseOfCode) Initializes the optional valuebaseOfCodeto baseOfCode.baseOfCode(Optional<Long> baseOfCode) Initializes the optional valuebaseOfCodeto baseOfCode.baseOfData(long baseOfData) Initializes the optional valuebaseOfDatato baseOfData.baseOfData(Optional<Long> baseOfData) Initializes the optional valuebaseOfDatato baseOfData.build()Builds a newWindowsPeOptionalHeader.checksumHex(String checksumHex) Initializes the optional valuechecksumHexto checksumHex.checksumHex(Optional<String> checksumHex) Initializes the optional valuechecksumHexto checksumHex.customProperties(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for thecustomPropertiesmap.dllCharacteristicsHex(String dllCharacteristicsHex) Initializes the optional valuedllCharacteristicsHexto dllCharacteristicsHex.dllCharacteristicsHex(Optional<String> dllCharacteristicsHex) Initializes the optional valuedllCharacteristicsHexto dllCharacteristicsHex.fileAlignment(long fileAlignment) Initializes the optional valuefileAlignmentto fileAlignment.fileAlignment(Optional<Long> fileAlignment) Initializes the optional valuefileAlignmentto fileAlignment.from(StixCustomProperties instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.common.StixCustomPropertiesinstance.from(WindowsPeOptionalHeaderObj instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.types.WindowsPeOptionalHeaderObjinstance.Sets or replaces all mappings from the specified map as entries for thehashesmap.imageBase(long imageBase) Initializes the optional valueimageBaseto imageBase.Initializes the optional valueimageBaseto imageBase.loaderFlagsHex(String loaderFlagsHex) Initializes the optional valueloaderFlagsHexto loaderFlagsHex.loaderFlagsHex(Optional<String> loaderFlagsHex) Initializes the optional valueloaderFlagsHexto loaderFlagsHex.Initializes the optional valuemagicHexto magicHex.Initializes the optional valuemagicHexto magicHex.majorImageVersion(long majorImageVersion) Initializes the optional valuemajorImageVersionto majorImageVersion.majorImageVersion(Optional<Long> majorImageVersion) Initializes the optional valuemajorImageVersionto majorImageVersion.majorLinkerVersion(long majorLinkerVersion) Initializes the optional valuemajorLinkerVersionto majorLinkerVersion.majorLinkerVersion(Optional<Long> majorLinkerVersion) Initializes the optional valuemajorLinkerVersionto majorLinkerVersion.majorOsVersion(long majorOsVersion) Initializes the optional valuemajorOsVersionto majorOsVersion.majorOsVersion(Optional<Long> majorOsVersion) Initializes the optional valuemajorOsVersionto majorOsVersion.majorSubsystemVersion(long majorSubsystemVersion) Initializes the optional valuemajorSubsystemVersionto majorSubsystemVersion.majorSubsystemVersion(Optional<Long> majorSubsystemVersion) Initializes the optional valuemajorSubsystemVersionto majorSubsystemVersion.minorImageVersion(long minorImageVersion) Initializes the optional valueminorImageVersionto minorImageVersion.minorImageVersion(Optional<Long> minorImageVersion) Initializes the optional valueminorImageVersionto minorImageVersion.minorLinkerVersion(long minorLinkerVersion) Initializes the optional valueminorLinkerVersionto minorLinkerVersion.minorLinkerVersion(Optional<Long> minorLinkerVersion) Initializes the optional valueminorLinkerVersionto minorLinkerVersion.minorOsVersion(long minorOsVersion) Initializes the optional valueminorOsVersionto minorOsVersion.minorOsVersion(Optional<Long> minorOsVersion) Initializes the optional valueminorOsVersionto minorOsVersion.minorSubsystemVersion(long minorSubsystemVersion) Initializes the optional valueminorSubsystemVersionto minorSubsystemVersion.minorSubsystemVersion(Optional<Long> minorSubsystemVersion) Initializes the optional valueminorSubsystemVersionto minorSubsystemVersion.numberOfRvaAndSizes(long numberOfRvaAndSizes) Initializes the optional valuenumberOfRvaAndSizesto numberOfRvaAndSizes.numberOfRvaAndSizes(Optional<Long> numberOfRvaAndSizes) Initializes the optional valuenumberOfRvaAndSizesto numberOfRvaAndSizes.putAllCustomProperties(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries tocustomPropertiesmap.putAllHashes(Map<String, ? extends String> entries) Put all mappings from the specified map as entries tohashesmap.putCustomProperty(String key, Object value) Put one entry to thecustomPropertiesmap.putCustomProperty(Map.Entry<String, ? extends Object> entry) Put one entry to thecustomPropertiesmap.Put one entry to thehashesmap.Put one entry to thehashesmap.sectionAlignment(long sectionAlignment) Initializes the optional valuesectionAlignmentto sectionAlignment.sectionAlignment(Optional<Long> sectionAlignment) Initializes the optional valuesectionAlignmentto sectionAlignment.sizeOfCode(long sizeOfCode) Initializes the optional valuesizeOfCodeto sizeOfCode.sizeOfCode(Optional<Long> sizeOfCode) Initializes the optional valuesizeOfCodeto sizeOfCode.sizeOfHeaders(long sizeOfHeaders) Initializes the optional valuesizeOfHeadersto sizeOfHeaders.sizeOfHeaders(Optional<Long> sizeOfHeaders) Initializes the optional valuesizeOfHeadersto sizeOfHeaders.sizeOfHeapCommit(long sizeOfHeapCommit) Initializes the optional valuesizeOfHeapCommitto sizeOfHeapCommit.sizeOfHeapCommit(Optional<Long> sizeOfHeapCommit) Initializes the optional valuesizeOfHeapCommitto sizeOfHeapCommit.sizeOfHeapReserve(long sizeOfHeapReserve) Initializes the optional valuesizeOfHeapReserveto sizeOfHeapReserve.sizeOfHeapReserve(Optional<Long> sizeOfHeapReserve) Initializes the optional valuesizeOfHeapReserveto sizeOfHeapReserve.sizeOfImage(long sizeOfImage) Initializes the optional valuesizeOfImageto sizeOfImage.sizeOfImage(Optional<Long> sizeOfImage) Initializes the optional valuesizeOfImageto sizeOfImage.sizeOfInitializedData(long sizeOfInitializedData) Initializes the optional valuesizeOfInitializedDatato sizeOfInitializedData.sizeOfInitializedData(Optional<Long> sizeOfInitializedData) Initializes the optional valuesizeOfInitializedDatato sizeOfInitializedData.sizeOfStackCommit(long sizeOfStackCommit) Initializes the optional valuesizeOfStackCommitto sizeOfStackCommit.sizeOfStackCommit(Optional<Long> sizeOfStackCommit) Initializes the optional valuesizeOfStackCommitto sizeOfStackCommit.sizeOfStackReserve(long sizeOfStackReserve) Initializes the optional valuesizeOfStackReserveto sizeOfStackReserve.sizeOfStackReserve(Optional<Long> sizeOfStackReserve) Initializes the optional valuesizeOfStackReserveto sizeOfStackReserve.sizeOfUninitializedData(long sizeOfUninitializedData) Initializes the optional valuesizeOfUninitializedDatato sizeOfUninitializedData.sizeOfUninitializedData(Optional<Long> sizeOfUninitializedData) Initializes the optional valuesizeOfUninitializedDatato sizeOfUninitializedData.subsystemHex(String subsystemHex) Initializes the optional valuesubsystemHexto subsystemHex.subsystemHex(Optional<String> subsystemHex) Initializes the optional valuesubsystemHexto subsystemHex.win32VersionValueHex(String win32VersionValueHex) Initializes the optional valuewin32VersionValueHexto win32VersionValueHex.win32VersionValueHex(Optional<String> win32VersionValueHex) Initializes the optional valuewin32VersionValueHexto win32VersionValueHex.
-
Method Details
-
from
@CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder from(WindowsPeOptionalHeaderObj instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.types.WindowsPeOptionalHeaderObjinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder from(StixCustomProperties instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.common.StixCustomPropertiesinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
magicHex
Initializes the optional valuemagicHexto magicHex.- Parameters:
magicHex- The value for magicHex- Returns:
thisbuilder for chained invocation
-
magicHex
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the unsigned Optional<Integer> that indicates the type of the PE binary.") public final WindowsPeOptionalHeader.Builder magicHex(Optional<String> magicHex) Initializes the optional valuemagicHexto magicHex.- Parameters:
magicHex- The value for magicHex- Returns:
thisbuilder for use in a chained invocation
-
majorLinkerVersion
@CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder majorLinkerVersion(long majorLinkerVersion) Initializes the optional valuemajorLinkerVersionto majorLinkerVersion.- Parameters:
majorLinkerVersion- The value for majorLinkerVersion- Returns:
thisbuilder for chained invocation
-
majorLinkerVersion
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the linker major version number.") public final WindowsPeOptionalHeader.Builder majorLinkerVersion(Optional<Long> majorLinkerVersion) Initializes the optional valuemajorLinkerVersionto majorLinkerVersion.- Parameters:
majorLinkerVersion- The value for majorLinkerVersion- Returns:
thisbuilder for use in a chained invocation
-
minorLinkerVersion
@CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder minorLinkerVersion(long minorLinkerVersion) Initializes the optional valueminorLinkerVersionto minorLinkerVersion.- Parameters:
minorLinkerVersion- The value for minorLinkerVersion- Returns:
thisbuilder for chained invocation
-
minorLinkerVersion
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the linker minor version number.") public final WindowsPeOptionalHeader.Builder minorLinkerVersion(Optional<Long> minorLinkerVersion) Initializes the optional valueminorLinkerVersionto minorLinkerVersion.- Parameters:
minorLinkerVersion- The value for minorLinkerVersion- Returns:
thisbuilder for use in a chained invocation
-
sizeOfCode
Initializes the optional valuesizeOfCodeto sizeOfCode.- Parameters:
sizeOfCode- The value for sizeOfCode- Returns:
thisbuilder for chained invocation
-
sizeOfCode
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the size of the code (text) section. If there are multiple such sections, this refers to the sum of the sizes of each section.") public final WindowsPeOptionalHeader.Builder sizeOfCode(Optional<Long> sizeOfCode) Initializes the optional valuesizeOfCodeto sizeOfCode.- Parameters:
sizeOfCode- The value for sizeOfCode- Returns:
thisbuilder for use in a chained invocation
-
sizeOfInitializedData
@CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder sizeOfInitializedData(long sizeOfInitializedData) Initializes the optional valuesizeOfInitializedDatato sizeOfInitializedData.- Parameters:
sizeOfInitializedData- The value for sizeOfInitializedData- Returns:
thisbuilder for chained invocation
-
sizeOfInitializedData
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the size of the initialized data section. If there are multiple such sections, this refers to the sum of the sizes of each section.") public final WindowsPeOptionalHeader.Builder sizeOfInitializedData(Optional<Long> sizeOfInitializedData) Initializes the optional valuesizeOfInitializedDatato sizeOfInitializedData.- Parameters:
sizeOfInitializedData- The value for sizeOfInitializedData- Returns:
thisbuilder for use in a chained invocation
-
sizeOfUninitializedData
@CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder sizeOfUninitializedData(long sizeOfUninitializedData) Initializes the optional valuesizeOfUninitializedDatato sizeOfUninitializedData.- Parameters:
sizeOfUninitializedData- The value for sizeOfUninitializedData- Returns:
thisbuilder for chained invocation
-
sizeOfUninitializedData
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the size of the uninitialized data section. If there are multiple such sections, this refers to the sum of the sizes of each section.") public final WindowsPeOptionalHeader.Builder sizeOfUninitializedData(Optional<Long> sizeOfUninitializedData) Initializes the optional valuesizeOfUninitializedDatato sizeOfUninitializedData.- Parameters:
sizeOfUninitializedData- The value for sizeOfUninitializedData- Returns:
thisbuilder for use in a chained invocation
-
addressOfEntryPoint
@CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder addressOfEntryPoint(long addressOfEntryPoint) Initializes the optional valueaddressOfEntryPointto addressOfEntryPoint.- Parameters:
addressOfEntryPoint- The value for addressOfEntryPoint- Returns:
thisbuilder for chained invocation
-
addressOfEntryPoint
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the address of the entry point relative to the image base when the executable is loaded into memory.") public final WindowsPeOptionalHeader.Builder addressOfEntryPoint(Optional<Long> addressOfEntryPoint) Initializes the optional valueaddressOfEntryPointto addressOfEntryPoint.- Parameters:
addressOfEntryPoint- The value for addressOfEntryPoint- Returns:
thisbuilder for use in a chained invocation
-
baseOfCode
Initializes the optional valuebaseOfCodeto baseOfCode.- Parameters:
baseOfCode- The value for baseOfCode- Returns:
thisbuilder for chained invocation
-
baseOfCode
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the address that is relative to the image base of the beginning-of-code section when it is loaded into memory.") public final WindowsPeOptionalHeader.Builder baseOfCode(Optional<Long> baseOfCode) Initializes the optional valuebaseOfCodeto baseOfCode.- Parameters:
baseOfCode- The value for baseOfCode- Returns:
thisbuilder for use in a chained invocation
-
baseOfData
Initializes the optional valuebaseOfDatato baseOfData.- Parameters:
baseOfData- The value for baseOfData- Returns:
thisbuilder for chained invocation
-
baseOfData
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the address that is relative to the image base of the beginning-of-data section when it is loaded into memory.") public final WindowsPeOptionalHeader.Builder baseOfData(Optional<Long> baseOfData) Initializes the optional valuebaseOfDatato baseOfData.- Parameters:
baseOfData- The value for baseOfData- Returns:
thisbuilder for use in a chained invocation
-
imageBase
Initializes the optional valueimageBaseto imageBase.- Parameters:
imageBase- The value for imageBase- Returns:
thisbuilder for chained invocation
-
imageBase
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the preferred address of the first byte of the image when loaded into memory.") public final WindowsPeOptionalHeader.Builder imageBase(Optional<Long> imageBase) Initializes the optional valueimageBaseto imageBase.- Parameters:
imageBase- The value for imageBase- Returns:
thisbuilder for use in a chained invocation
-
sectionAlignment
@CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder sectionAlignment(long sectionAlignment) Initializes the optional valuesectionAlignmentto sectionAlignment.- Parameters:
sectionAlignment- The value for sectionAlignment- Returns:
thisbuilder for chained invocation
-
sectionAlignment
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the alignment (in bytes) of PE sections when they are loaded into memory.") public final WindowsPeOptionalHeader.Builder sectionAlignment(Optional<Long> sectionAlignment) Initializes the optional valuesectionAlignmentto sectionAlignment.- Parameters:
sectionAlignment- The value for sectionAlignment- Returns:
thisbuilder for use in a chained invocation
-
fileAlignment
@CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder fileAlignment(long fileAlignment) Initializes the optional valuefileAlignmentto fileAlignment.- Parameters:
fileAlignment- The value for fileAlignment- Returns:
thisbuilder for chained invocation
-
fileAlignment
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the factor (in bytes) that is used to align the raw data of sections in the image file.") public final WindowsPeOptionalHeader.Builder fileAlignment(Optional<Long> fileAlignment) Initializes the optional valuefileAlignmentto fileAlignment.- Parameters:
fileAlignment- The value for fileAlignment- Returns:
thisbuilder for use in a chained invocation
-
majorOsVersion
@CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder majorOsVersion(long majorOsVersion) Initializes the optional valuemajorOsVersionto majorOsVersion.- Parameters:
majorOsVersion- The value for majorOsVersion- Returns:
thisbuilder for chained invocation
-
majorOsVersion
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the major version number of the required operating system.") public final WindowsPeOptionalHeader.Builder majorOsVersion(Optional<Long> majorOsVersion) Initializes the optional valuemajorOsVersionto majorOsVersion.- Parameters:
majorOsVersion- The value for majorOsVersion- Returns:
thisbuilder for use in a chained invocation
-
minorOsVersion
@CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder minorOsVersion(long minorOsVersion) Initializes the optional valueminorOsVersionto minorOsVersion.- Parameters:
minorOsVersion- The value for minorOsVersion- Returns:
thisbuilder for chained invocation
-
minorOsVersion
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the minor version number of the required operating system.") public final WindowsPeOptionalHeader.Builder minorOsVersion(Optional<Long> minorOsVersion) Initializes the optional valueminorOsVersionto minorOsVersion.- Parameters:
minorOsVersion- The value for minorOsVersion- Returns:
thisbuilder for use in a chained invocation
-
majorImageVersion
@CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder majorImageVersion(long majorImageVersion) Initializes the optional valuemajorImageVersionto majorImageVersion.- Parameters:
majorImageVersion- The value for majorImageVersion- Returns:
thisbuilder for chained invocation
-
majorImageVersion
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the major version number of the image.") public final WindowsPeOptionalHeader.Builder majorImageVersion(Optional<Long> majorImageVersion) Initializes the optional valuemajorImageVersionto majorImageVersion.- Parameters:
majorImageVersion- The value for majorImageVersion- Returns:
thisbuilder for use in a chained invocation
-
minorImageVersion
@CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder minorImageVersion(long minorImageVersion) Initializes the optional valueminorImageVersionto minorImageVersion.- Parameters:
minorImageVersion- The value for minorImageVersion- Returns:
thisbuilder for chained invocation
-
minorImageVersion
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the minor version number of the image.") public final WindowsPeOptionalHeader.Builder minorImageVersion(Optional<Long> minorImageVersion) Initializes the optional valueminorImageVersionto minorImageVersion.- Parameters:
minorImageVersion- The value for minorImageVersion- Returns:
thisbuilder for use in a chained invocation
-
majorSubsystemVersion
@CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder majorSubsystemVersion(long majorSubsystemVersion) Initializes the optional valuemajorSubsystemVersionto majorSubsystemVersion.- Parameters:
majorSubsystemVersion- The value for majorSubsystemVersion- Returns:
thisbuilder for chained invocation
-
majorSubsystemVersion
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the major version number of the subsystem.") public final WindowsPeOptionalHeader.Builder majorSubsystemVersion(Optional<Long> majorSubsystemVersion) Initializes the optional valuemajorSubsystemVersionto majorSubsystemVersion.- Parameters:
majorSubsystemVersion- The value for majorSubsystemVersion- Returns:
thisbuilder for use in a chained invocation
-
minorSubsystemVersion
@CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder minorSubsystemVersion(long minorSubsystemVersion) Initializes the optional valueminorSubsystemVersionto minorSubsystemVersion.- Parameters:
minorSubsystemVersion- The value for minorSubsystemVersion- Returns:
thisbuilder for chained invocation
-
minorSubsystemVersion
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the minor version number of the subsystem.") public final WindowsPeOptionalHeader.Builder minorSubsystemVersion(Optional<Long> minorSubsystemVersion) Initializes the optional valueminorSubsystemVersionto minorSubsystemVersion.- Parameters:
minorSubsystemVersion- The value for minorSubsystemVersion- Returns:
thisbuilder for use in a chained invocation
-
win32VersionValueHex
@CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder win32VersionValueHex(String win32VersionValueHex) Initializes the optional valuewin32VersionValueHexto win32VersionValueHex.- Parameters:
win32VersionValueHex- The value for win32VersionValueHex- Returns:
thisbuilder for chained invocation
-
win32VersionValueHex
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the reserved win32 version value.") public final WindowsPeOptionalHeader.Builder win32VersionValueHex(Optional<String> win32VersionValueHex) Initializes the optional valuewin32VersionValueHexto win32VersionValueHex.- Parameters:
win32VersionValueHex- The value for win32VersionValueHex- Returns:
thisbuilder for use in a chained invocation
-
sizeOfImage
Initializes the optional valuesizeOfImageto sizeOfImage.- Parameters:
sizeOfImage- The value for sizeOfImage- Returns:
thisbuilder for chained invocation
-
sizeOfImage
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the size, in bytes, of the image, including all headers, as the image is loaded in memory.") public final WindowsPeOptionalHeader.Builder sizeOfImage(Optional<Long> sizeOfImage) Initializes the optional valuesizeOfImageto sizeOfImage.- Parameters:
sizeOfImage- The value for sizeOfImage- Returns:
thisbuilder for use in a chained invocation
-
sizeOfHeaders
@CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder sizeOfHeaders(long sizeOfHeaders) Initializes the optional valuesizeOfHeadersto sizeOfHeaders.- Parameters:
sizeOfHeaders- The value for sizeOfHeaders- Returns:
thisbuilder for chained invocation
-
sizeOfHeaders
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the combined size of the MS-DOS, PE header, and section headers, rounded up a multiple of the value specified in the file_alignment header.") public final WindowsPeOptionalHeader.Builder sizeOfHeaders(Optional<Long> sizeOfHeaders) Initializes the optional valuesizeOfHeadersto sizeOfHeaders.- Parameters:
sizeOfHeaders- The value for sizeOfHeaders- Returns:
thisbuilder for use in a chained invocation
-
checksumHex
Initializes the optional valuechecksumHexto checksumHex.- Parameters:
checksumHex- The value for checksumHex- Returns:
thisbuilder for chained invocation
-
checksumHex
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the checksum of the PE binary.") public final WindowsPeOptionalHeader.Builder checksumHex(Optional<String> checksumHex) Initializes the optional valuechecksumHexto checksumHex.- Parameters:
checksumHex- The value for checksumHex- Returns:
thisbuilder for use in a chained invocation
-
subsystemHex
@CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder subsystemHex(String subsystemHex) Initializes the optional valuesubsystemHexto subsystemHex.- Parameters:
subsystemHex- The value for subsystemHex- Returns:
thisbuilder for chained invocation
-
subsystemHex
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the subsystem (e.g., GUI, device driver, etc.) that is required to run this image.") public final WindowsPeOptionalHeader.Builder subsystemHex(Optional<String> subsystemHex) Initializes the optional valuesubsystemHexto subsystemHex.- Parameters:
subsystemHex- The value for subsystemHex- Returns:
thisbuilder for use in a chained invocation
-
dllCharacteristicsHex
@CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder dllCharacteristicsHex(String dllCharacteristicsHex) Initializes the optional valuedllCharacteristicsHexto dllCharacteristicsHex.- Parameters:
dllCharacteristicsHex- The value for dllCharacteristicsHex- Returns:
thisbuilder for chained invocation
-
dllCharacteristicsHex
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the flags that characterize the PE binary.") public final WindowsPeOptionalHeader.Builder dllCharacteristicsHex(Optional<String> dllCharacteristicsHex) Initializes the optional valuedllCharacteristicsHexto dllCharacteristicsHex.- Parameters:
dllCharacteristicsHex- The value for dllCharacteristicsHex- Returns:
thisbuilder for use in a chained invocation
-
sizeOfStackReserve
@CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder sizeOfStackReserve(long sizeOfStackReserve) Initializes the optional valuesizeOfStackReserveto sizeOfStackReserve.- Parameters:
sizeOfStackReserve- The value for sizeOfStackReserve- Returns:
thisbuilder for chained invocation
-
sizeOfStackReserve
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the size of the stack to reserve") public final WindowsPeOptionalHeader.Builder sizeOfStackReserve(Optional<Long> sizeOfStackReserve) Initializes the optional valuesizeOfStackReserveto sizeOfStackReserve.- Parameters:
sizeOfStackReserve- The value for sizeOfStackReserve- Returns:
thisbuilder for use in a chained invocation
-
sizeOfStackCommit
@CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder sizeOfStackCommit(long sizeOfStackCommit) Initializes the optional valuesizeOfStackCommitto sizeOfStackCommit.- Parameters:
sizeOfStackCommit- The value for sizeOfStackCommit- Returns:
thisbuilder for chained invocation
-
sizeOfStackCommit
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the size of the stack to commit.") public final WindowsPeOptionalHeader.Builder sizeOfStackCommit(Optional<Long> sizeOfStackCommit) Initializes the optional valuesizeOfStackCommitto sizeOfStackCommit.- Parameters:
sizeOfStackCommit- The value for sizeOfStackCommit- Returns:
thisbuilder for use in a chained invocation
-
sizeOfHeapReserve
@CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder sizeOfHeapReserve(long sizeOfHeapReserve) Initializes the optional valuesizeOfHeapReserveto sizeOfHeapReserve.- Parameters:
sizeOfHeapReserve- The value for sizeOfHeapReserve- Returns:
thisbuilder for chained invocation
-
sizeOfHeapReserve
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the size of the local heap space to reserve.") public final WindowsPeOptionalHeader.Builder sizeOfHeapReserve(Optional<Long> sizeOfHeapReserve) Initializes the optional valuesizeOfHeapReserveto sizeOfHeapReserve.- Parameters:
sizeOfHeapReserve- The value for sizeOfHeapReserve- Returns:
thisbuilder for use in a chained invocation
-
sizeOfHeapCommit
@CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder sizeOfHeapCommit(long sizeOfHeapCommit) Initializes the optional valuesizeOfHeapCommitto sizeOfHeapCommit.- Parameters:
sizeOfHeapCommit- The value for sizeOfHeapCommit- Returns:
thisbuilder for chained invocation
-
sizeOfHeapCommit
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the size of the local heap space to commit.") public final WindowsPeOptionalHeader.Builder sizeOfHeapCommit(Optional<Long> sizeOfHeapCommit) Initializes the optional valuesizeOfHeapCommitto sizeOfHeapCommit.- Parameters:
sizeOfHeapCommit- The value for sizeOfHeapCommit- Returns:
thisbuilder for use in a chained invocation
-
loaderFlagsHex
@CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder loaderFlagsHex(String loaderFlagsHex) Initializes the optional valueloaderFlagsHexto loaderFlagsHex.- Parameters:
loaderFlagsHex- The value for loaderFlagsHex- Returns:
thisbuilder for chained invocation
-
loaderFlagsHex
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the reserved loader flags.") public final WindowsPeOptionalHeader.Builder loaderFlagsHex(Optional<String> loaderFlagsHex) Initializes the optional valueloaderFlagsHexto loaderFlagsHex.- Parameters:
loaderFlagsHex- The value for loaderFlagsHex- Returns:
thisbuilder for use in a chained invocation
-
numberOfRvaAndSizes
@CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder numberOfRvaAndSizes(long numberOfRvaAndSizes) Initializes the optional valuenumberOfRvaAndSizesto numberOfRvaAndSizes.- Parameters:
numberOfRvaAndSizes- The value for numberOfRvaAndSizes- Returns:
thisbuilder for chained invocation
-
numberOfRvaAndSizes
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the number of data-directory entries in the remainder of the optional header.") public final WindowsPeOptionalHeader.Builder numberOfRvaAndSizes(Optional<Long> numberOfRvaAndSizes) Initializes the optional valuenumberOfRvaAndSizesto numberOfRvaAndSizes.- Parameters:
numberOfRvaAndSizes- The value for numberOfRvaAndSizes- Returns:
thisbuilder for use in a chained invocation
-
putHash
@CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder putHash(String key, String value) Put one entry to thehashesmap.- Parameters:
key- The key in the hashes mapvalue- The associated value in the hashes map- Returns:
thisbuilder for use in a chained invocation
-
putHash
@CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder putHash(Map.Entry<String, ? extends String> entry) Put one entry to thehashesmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
hashes
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies any hashes that were computed for the optional header.") public final WindowsPeOptionalHeader.Builder hashes(Map<String, ? extends String> entries) Sets or replaces all mappings from the specified map as entries for thehashesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the hashes map- Returns:
thisbuilder for use in a chained invocation
-
putAllHashes
@CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder putAllHashes(Map<String, ? extends String> entries) Put all mappings from the specified map as entries tohashesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the hashes map- Returns:
thisbuilder for use in a chained invocation
-
putCustomProperty
@CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder putCustomProperty(String key, Object value) Put one entry to thecustomPropertiesmap.- Parameters:
key- The key in the customProperties mapvalue- The associated value in the customProperties map- Returns:
thisbuilder for use in a chained invocation
-
putCustomProperty
@CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder putCustomProperty(Map.Entry<String, ? extends Object> entry) Put one entry to thecustomPropertiesmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
customProperties
@CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder customProperties(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for thecustomPropertiesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the customProperties map- Returns:
thisbuilder for use in a chained invocation
-
putAllCustomProperties
@CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder putAllCustomProperties(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries tocustomPropertiesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the customProperties map- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newWindowsPeOptionalHeader.- Returns:
- An immutable instance of WindowsPeOptionalHeader
- Throws:
IllegalStateException- if any required attributes are missing
-