Top Description Fields Constructors Methods
org.apache.commons.compress.harmony.unpack200

public Class SegmentOptions

extends Object
Class Inheritance
Imports
org.apache.commons.compress.harmony.pack200.Pack200Exception

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.

Field Summary

Modifier and TypeField and Description
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private final int
private static final int
UNUSED

The bit flags that are defined as unused by the specification; specifically, every bit above bit 13 and bit 3.

Constructor Summary

AccessConstructor and Description
public
SegmentOptions(final int
the integer value to use as the flags
options
)

Creates a new segment options with the given integer value.

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFLATE_HINTback to summary
private static final int DEFLATE_HINT
HAVE_ALL_CODE_FLAGSback to summary
private static final int HAVE_ALL_CODE_FLAGS
HAVE_CLASS_FLAGS_HIback to summary
private static final int HAVE_CLASS_FLAGS_HI
HAVE_CODE_FLAGS_HIback to summary
private static final int HAVE_CODE_FLAGS_HI
HAVE_CP_NUMBERSback to summary
private static final int HAVE_CP_NUMBERS
HAVE_FIELD_FLAGS_HIback to summary
private static final int HAVE_FIELD_FLAGS_HI
HAVE_FILE_HEADERSback to summary
private static final int HAVE_FILE_HEADERS
HAVE_FILE_MODTIMEback to summary
private static final int HAVE_FILE_MODTIME
HAVE_FILE_OPTIONSback to summary
private static final int HAVE_FILE_OPTIONS
HAVE_FILE_SIZE_HIback to summary
private static final int HAVE_FILE_SIZE_HI
HAVE_METHOD_FLAGS_HIback to summary
private static final int HAVE_METHOD_FLAGS_HI
HAVE_SPECIAL_FORMATSback to summary
private static final int HAVE_SPECIAL_FORMATS
optionsback to summary
private final int options
UNUSEDback to summary
private static final int UNUSED

The bit flags that are defined as unused by the specification; specifically, every bit above bit 13 and bit 3.

Constructor Detail

SegmentOptionsback to summary
public SegmentOptions(final int options) throws Pack200Exception

Creates a new segment options with the given integer value.

Parameters
options:int

the integer value to use as the flags

Exceptions
Pack200Exception:
if an unused bit (bit 3 or bit 13+) is non-zero

Method Detail

hasAllCodeFlagsback to summary
public boolean hasAllCodeFlags()
hasArchiveFileCountsback to summary
public boolean hasArchiveFileCounts()
hasClassFlagsHiback to summary
public boolean hasClassFlagsHi()
hasCodeFlagsHiback to summary
public boolean hasCodeFlagsHi()
hasCPNumberCountsback to summary
public boolean hasCPNumberCounts()
hasFieldFlagsHiback to summary
public boolean hasFieldFlagsHi()
hasFileModtimeback to summary
public boolean hasFileModtime()
hasFileOptionsback to summary
public boolean hasFileOptions()
hasFileSizeHiback to summary
public boolean hasFileSizeHi()
hasMethodFlagsHiback to summary
public boolean hasMethodFlagsHi()
hasSpecialFormatsback to summary
public boolean hasSpecialFormats()
shouldDeflateback to summary
public boolean shouldDeflate()