Class WindowsPeOptionalHeader.Builder

java.lang.Object
security.whisper.javastix.coo.types.WindowsPeOptionalHeader.Builder
Enclosing class:
WindowsPeOptionalHeader

@NotThreadSafe public static final class WindowsPeOptionalHeader.Builder extends Object
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 Details

    • from

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder from(WindowsPeOptionalHeaderObj instance)
      Fill a builder with attribute values from the provided security.whisper.javastix.coo.types.WindowsPeOptionalHeaderObj instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder from(StixCustomProperties instance)
      Fill a builder with attribute values from the provided security.whisper.javastix.common.StixCustomProperties instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • magicHex

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder magicHex(String magicHex)
      Initializes the optional value magicHex to magicHex.
      Parameters:
      magicHex - The value for magicHex
      Returns:
      this builder 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 value magicHex to magicHex.
      Parameters:
      magicHex - The value for magicHex
      Returns:
      this builder for use in a chained invocation
    • majorLinkerVersion

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder majorLinkerVersion(long majorLinkerVersion)
      Initializes the optional value majorLinkerVersion to majorLinkerVersion.
      Parameters:
      majorLinkerVersion - The value for majorLinkerVersion
      Returns:
      this builder for chained invocation
    • majorLinkerVersion

      @CanIgnoreReturnValue @JsonPropertyDescription("Specifies the linker major version number.") public final WindowsPeOptionalHeader.Builder majorLinkerVersion(Optional<Long> majorLinkerVersion)
      Initializes the optional value majorLinkerVersion to majorLinkerVersion.
      Parameters:
      majorLinkerVersion - The value for majorLinkerVersion
      Returns:
      this builder for use in a chained invocation
    • minorLinkerVersion

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder minorLinkerVersion(long minorLinkerVersion)
      Initializes the optional value minorLinkerVersion to minorLinkerVersion.
      Parameters:
      minorLinkerVersion - The value for minorLinkerVersion
      Returns:
      this builder for chained invocation
    • minorLinkerVersion

      @CanIgnoreReturnValue @JsonPropertyDescription("Specifies the linker minor version number.") public final WindowsPeOptionalHeader.Builder minorLinkerVersion(Optional<Long> minorLinkerVersion)
      Initializes the optional value minorLinkerVersion to minorLinkerVersion.
      Parameters:
      minorLinkerVersion - The value for minorLinkerVersion
      Returns:
      this builder for use in a chained invocation
    • sizeOfCode

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder sizeOfCode(long sizeOfCode)
      Initializes the optional value sizeOfCode to sizeOfCode.
      Parameters:
      sizeOfCode - The value for sizeOfCode
      Returns:
      this builder 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 value sizeOfCode to sizeOfCode.
      Parameters:
      sizeOfCode - The value for sizeOfCode
      Returns:
      this builder for use in a chained invocation
    • sizeOfInitializedData

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder sizeOfInitializedData(long sizeOfInitializedData)
      Initializes the optional value sizeOfInitializedData to sizeOfInitializedData.
      Parameters:
      sizeOfInitializedData - The value for sizeOfInitializedData
      Returns:
      this builder 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 value sizeOfInitializedData to sizeOfInitializedData.
      Parameters:
      sizeOfInitializedData - The value for sizeOfInitializedData
      Returns:
      this builder for use in a chained invocation
    • sizeOfUninitializedData

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder sizeOfUninitializedData(long sizeOfUninitializedData)
      Initializes the optional value sizeOfUninitializedData to sizeOfUninitializedData.
      Parameters:
      sizeOfUninitializedData - The value for sizeOfUninitializedData
      Returns:
      this builder 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 value sizeOfUninitializedData to sizeOfUninitializedData.
      Parameters:
      sizeOfUninitializedData - The value for sizeOfUninitializedData
      Returns:
      this builder for use in a chained invocation
    • addressOfEntryPoint

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder addressOfEntryPoint(long addressOfEntryPoint)
      Initializes the optional value addressOfEntryPoint to addressOfEntryPoint.
      Parameters:
      addressOfEntryPoint - The value for addressOfEntryPoint
      Returns:
      this builder 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 value addressOfEntryPoint to addressOfEntryPoint.
      Parameters:
      addressOfEntryPoint - The value for addressOfEntryPoint
      Returns:
      this builder for use in a chained invocation
    • baseOfCode

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder baseOfCode(long baseOfCode)
      Initializes the optional value baseOfCode to baseOfCode.
      Parameters:
      baseOfCode - The value for baseOfCode
      Returns:
      this builder 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 value baseOfCode to baseOfCode.
      Parameters:
      baseOfCode - The value for baseOfCode
      Returns:
      this builder for use in a chained invocation
    • baseOfData

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder baseOfData(long baseOfData)
      Initializes the optional value baseOfData to baseOfData.
      Parameters:
      baseOfData - The value for baseOfData
      Returns:
      this builder 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 value baseOfData to baseOfData.
      Parameters:
      baseOfData - The value for baseOfData
      Returns:
      this builder for use in a chained invocation
    • imageBase

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder imageBase(long imageBase)
      Initializes the optional value imageBase to imageBase.
      Parameters:
      imageBase - The value for imageBase
      Returns:
      this builder 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 value imageBase to imageBase.
      Parameters:
      imageBase - The value for imageBase
      Returns:
      this builder for use in a chained invocation
    • sectionAlignment

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder sectionAlignment(long sectionAlignment)
      Initializes the optional value sectionAlignment to sectionAlignment.
      Parameters:
      sectionAlignment - The value for sectionAlignment
      Returns:
      this builder 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 value sectionAlignment to sectionAlignment.
      Parameters:
      sectionAlignment - The value for sectionAlignment
      Returns:
      this builder for use in a chained invocation
    • fileAlignment

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder fileAlignment(long fileAlignment)
      Initializes the optional value fileAlignment to fileAlignment.
      Parameters:
      fileAlignment - The value for fileAlignment
      Returns:
      this builder 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 value fileAlignment to fileAlignment.
      Parameters:
      fileAlignment - The value for fileAlignment
      Returns:
      this builder for use in a chained invocation
    • majorOsVersion

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder majorOsVersion(long majorOsVersion)
      Initializes the optional value majorOsVersion to majorOsVersion.
      Parameters:
      majorOsVersion - The value for majorOsVersion
      Returns:
      this builder 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 value majorOsVersion to majorOsVersion.
      Parameters:
      majorOsVersion - The value for majorOsVersion
      Returns:
      this builder for use in a chained invocation
    • minorOsVersion

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder minorOsVersion(long minorOsVersion)
      Initializes the optional value minorOsVersion to minorOsVersion.
      Parameters:
      minorOsVersion - The value for minorOsVersion
      Returns:
      this builder 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 value minorOsVersion to minorOsVersion.
      Parameters:
      minorOsVersion - The value for minorOsVersion
      Returns:
      this builder for use in a chained invocation
    • majorImageVersion

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder majorImageVersion(long majorImageVersion)
      Initializes the optional value majorImageVersion to majorImageVersion.
      Parameters:
      majorImageVersion - The value for majorImageVersion
      Returns:
      this builder 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 value majorImageVersion to majorImageVersion.
      Parameters:
      majorImageVersion - The value for majorImageVersion
      Returns:
      this builder for use in a chained invocation
    • minorImageVersion

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder minorImageVersion(long minorImageVersion)
      Initializes the optional value minorImageVersion to minorImageVersion.
      Parameters:
      minorImageVersion - The value for minorImageVersion
      Returns:
      this builder 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 value minorImageVersion to minorImageVersion.
      Parameters:
      minorImageVersion - The value for minorImageVersion
      Returns:
      this builder for use in a chained invocation
    • majorSubsystemVersion

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder majorSubsystemVersion(long majorSubsystemVersion)
      Initializes the optional value majorSubsystemVersion to majorSubsystemVersion.
      Parameters:
      majorSubsystemVersion - The value for majorSubsystemVersion
      Returns:
      this builder 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 value majorSubsystemVersion to majorSubsystemVersion.
      Parameters:
      majorSubsystemVersion - The value for majorSubsystemVersion
      Returns:
      this builder for use in a chained invocation
    • minorSubsystemVersion

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder minorSubsystemVersion(long minorSubsystemVersion)
      Initializes the optional value minorSubsystemVersion to minorSubsystemVersion.
      Parameters:
      minorSubsystemVersion - The value for minorSubsystemVersion
      Returns:
      this builder 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 value minorSubsystemVersion to minorSubsystemVersion.
      Parameters:
      minorSubsystemVersion - The value for minorSubsystemVersion
      Returns:
      this builder for use in a chained invocation
    • win32VersionValueHex

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder win32VersionValueHex(String win32VersionValueHex)
      Initializes the optional value win32VersionValueHex to win32VersionValueHex.
      Parameters:
      win32VersionValueHex - The value for win32VersionValueHex
      Returns:
      this builder for chained invocation
    • win32VersionValueHex

      @CanIgnoreReturnValue @JsonPropertyDescription("Specifies the reserved win32 version value.") public final WindowsPeOptionalHeader.Builder win32VersionValueHex(Optional<String> win32VersionValueHex)
      Initializes the optional value win32VersionValueHex to win32VersionValueHex.
      Parameters:
      win32VersionValueHex - The value for win32VersionValueHex
      Returns:
      this builder for use in a chained invocation
    • sizeOfImage

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder sizeOfImage(long sizeOfImage)
      Initializes the optional value sizeOfImage to sizeOfImage.
      Parameters:
      sizeOfImage - The value for sizeOfImage
      Returns:
      this builder 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 value sizeOfImage to sizeOfImage.
      Parameters:
      sizeOfImage - The value for sizeOfImage
      Returns:
      this builder for use in a chained invocation
    • sizeOfHeaders

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder sizeOfHeaders(long sizeOfHeaders)
      Initializes the optional value sizeOfHeaders to sizeOfHeaders.
      Parameters:
      sizeOfHeaders - The value for sizeOfHeaders
      Returns:
      this builder 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 value sizeOfHeaders to sizeOfHeaders.
      Parameters:
      sizeOfHeaders - The value for sizeOfHeaders
      Returns:
      this builder for use in a chained invocation
    • checksumHex

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder checksumHex(String checksumHex)
      Initializes the optional value checksumHex to checksumHex.
      Parameters:
      checksumHex - The value for checksumHex
      Returns:
      this builder for chained invocation
    • checksumHex

      @CanIgnoreReturnValue @JsonPropertyDescription("Specifies the checksum of the PE binary.") public final WindowsPeOptionalHeader.Builder checksumHex(Optional<String> checksumHex)
      Initializes the optional value checksumHex to checksumHex.
      Parameters:
      checksumHex - The value for checksumHex
      Returns:
      this builder for use in a chained invocation
    • subsystemHex

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder subsystemHex(String subsystemHex)
      Initializes the optional value subsystemHex to subsystemHex.
      Parameters:
      subsystemHex - The value for subsystemHex
      Returns:
      this builder 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 value subsystemHex to subsystemHex.
      Parameters:
      subsystemHex - The value for subsystemHex
      Returns:
      this builder for use in a chained invocation
    • dllCharacteristicsHex

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder dllCharacteristicsHex(String dllCharacteristicsHex)
      Initializes the optional value dllCharacteristicsHex to dllCharacteristicsHex.
      Parameters:
      dllCharacteristicsHex - The value for dllCharacteristicsHex
      Returns:
      this builder 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 value dllCharacteristicsHex to dllCharacteristicsHex.
      Parameters:
      dllCharacteristicsHex - The value for dllCharacteristicsHex
      Returns:
      this builder for use in a chained invocation
    • sizeOfStackReserve

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder sizeOfStackReserve(long sizeOfStackReserve)
      Initializes the optional value sizeOfStackReserve to sizeOfStackReserve.
      Parameters:
      sizeOfStackReserve - The value for sizeOfStackReserve
      Returns:
      this builder 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 value sizeOfStackReserve to sizeOfStackReserve.
      Parameters:
      sizeOfStackReserve - The value for sizeOfStackReserve
      Returns:
      this builder for use in a chained invocation
    • sizeOfStackCommit

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder sizeOfStackCommit(long sizeOfStackCommit)
      Initializes the optional value sizeOfStackCommit to sizeOfStackCommit.
      Parameters:
      sizeOfStackCommit - The value for sizeOfStackCommit
      Returns:
      this builder 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 value sizeOfStackCommit to sizeOfStackCommit.
      Parameters:
      sizeOfStackCommit - The value for sizeOfStackCommit
      Returns:
      this builder for use in a chained invocation
    • sizeOfHeapReserve

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder sizeOfHeapReserve(long sizeOfHeapReserve)
      Initializes the optional value sizeOfHeapReserve to sizeOfHeapReserve.
      Parameters:
      sizeOfHeapReserve - The value for sizeOfHeapReserve
      Returns:
      this builder 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 value sizeOfHeapReserve to sizeOfHeapReserve.
      Parameters:
      sizeOfHeapReserve - The value for sizeOfHeapReserve
      Returns:
      this builder for use in a chained invocation
    • sizeOfHeapCommit

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder sizeOfHeapCommit(long sizeOfHeapCommit)
      Initializes the optional value sizeOfHeapCommit to sizeOfHeapCommit.
      Parameters:
      sizeOfHeapCommit - The value for sizeOfHeapCommit
      Returns:
      this builder 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 value sizeOfHeapCommit to sizeOfHeapCommit.
      Parameters:
      sizeOfHeapCommit - The value for sizeOfHeapCommit
      Returns:
      this builder for use in a chained invocation
    • loaderFlagsHex

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder loaderFlagsHex(String loaderFlagsHex)
      Initializes the optional value loaderFlagsHex to loaderFlagsHex.
      Parameters:
      loaderFlagsHex - The value for loaderFlagsHex
      Returns:
      this builder for chained invocation
    • loaderFlagsHex

      @CanIgnoreReturnValue @JsonPropertyDescription("Specifies the reserved loader flags.") public final WindowsPeOptionalHeader.Builder loaderFlagsHex(Optional<String> loaderFlagsHex)
      Initializes the optional value loaderFlagsHex to loaderFlagsHex.
      Parameters:
      loaderFlagsHex - The value for loaderFlagsHex
      Returns:
      this builder for use in a chained invocation
    • numberOfRvaAndSizes

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder numberOfRvaAndSizes(long numberOfRvaAndSizes)
      Initializes the optional value numberOfRvaAndSizes to numberOfRvaAndSizes.
      Parameters:
      numberOfRvaAndSizes - The value for numberOfRvaAndSizes
      Returns:
      this builder 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 value numberOfRvaAndSizes to numberOfRvaAndSizes.
      Parameters:
      numberOfRvaAndSizes - The value for numberOfRvaAndSizes
      Returns:
      this builder for use in a chained invocation
    • putHash

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder putHash(String key, String value)
      Put one entry to the hashes map.
      Parameters:
      key - The key in the hashes map
      value - The associated value in the hashes map
      Returns:
      this builder for use in a chained invocation
    • putHash

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder putHash(Map.Entry<String,? extends String> entry)
      Put one entry to the hashes map. Nulls are not permitted
      Parameters:
      entry - The key and value entry
      Returns:
      this builder 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 the hashes map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the hashes map
      Returns:
      this builder 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 to hashes map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the hashes map
      Returns:
      this builder for use in a chained invocation
    • putCustomProperty

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder putCustomProperty(String key, Object value)
      Put one entry to the customProperties map.
      Parameters:
      key - The key in the customProperties map
      value - The associated value in the customProperties map
      Returns:
      this builder for use in a chained invocation
    • putCustomProperty

      @CanIgnoreReturnValue public final WindowsPeOptionalHeader.Builder putCustomProperty(Map.Entry<String,? extends Object> entry)
      Put one entry to the customProperties map. Nulls are not permitted
      Parameters:
      entry - The key and value entry
      Returns:
      this builder 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 the customProperties map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the customProperties map
      Returns:
      this builder 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 to customProperties map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the customProperties map
      Returns:
      this builder for use in a chained invocation
    • build

      public WindowsPeOptionalHeader build()
      Returns:
      An immutable instance of WindowsPeOptionalHeader
      Throws:
      IllegalStateException - if any required attributes are missing