Class SegmentOptions
- java.lang.Object
-
- org.apache.commons.compress.harmony.unpack200.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 inSegment
, 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 Summary
Constructors Constructor Description SegmentOptions(int options)
Creates a new segment options with the given integer value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasAllCodeFlags()
boolean
hasArchiveFileCounts()
boolean
hasClassFlagsHi()
boolean
hasCodeFlagsHi()
boolean
hasCPNumberCounts()
boolean
hasFieldFlagsHi()
boolean
hasFileModtime()
boolean
hasFileOptions()
boolean
hasFileSizeHi()
boolean
hasMethodFlagsHi()
boolean
hasSpecialFormats()
boolean
shouldDeflate()
-
-
-
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()
-
-