Class SegmentOptions


  • public class SegmentOptions
    extends java.lang.Object
    Stores the combinations of bit flags that can be used in the segment header options. Whilst this could be defined in Segment, it's cleaner to pull it out into a separate class, not least because methods can then be used to determine the semantic meaning of the flags. In languages with a pre-processor, these may be defined by macros that do bitflag manipulation instead.
    • Constructor Detail

      • SegmentOptions

        public SegmentOptions​(int options)
                       throws Pack200Exception
        Creates a new segment options with the given integer value.
        Parameters:
        options - the integer value to use as the flags
        Throws:
        Pack200Exception - if an unused bit (bit 3 or bit 13+) is non-zero
    • Method Detail

      • hasAllCodeFlags

        public boolean hasAllCodeFlags()
      • hasArchiveFileCounts

        public boolean hasArchiveFileCounts()
      • hasClassFlagsHi

        public boolean hasClassFlagsHi()
      • hasCodeFlagsHi

        public boolean hasCodeFlagsHi()
      • hasCPNumberCounts

        public boolean hasCPNumberCounts()
      • hasFieldFlagsHi

        public boolean hasFieldFlagsHi()
      • hasFileModtime

        public boolean hasFileModtime()
      • hasFileOptions

        public boolean hasFileOptions()
      • hasFileSizeHi

        public boolean hasFileSizeHi()
      • hasMethodFlagsHi

        public boolean hasMethodFlagsHi()
      • hasSpecialFormats

        public boolean hasSpecialFormats()
      • shouldDeflate

        public boolean shouldDeflate()