Package org.apache.pdfbox.jbig2.segments
Class RegionSegmentInformation
java.lang.Object
org.apache.pdfbox.jbig2.segments.RegionSegmentInformation
- All Implemented Interfaces:
SegmentData
This class represents the "Region segment information" field, 7.4.1 (page 50).
Every region segment data starts with this part.
Every region segment data starts with this part.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
Region segment bitmap height, 7.4.1.2private int
Region segment bitmap width, 7.4.1.1private CombinationOperator
Region segment flags, 7.4.1.5private SubInputStream
private int
Region segment bitmap X location, 7.4.1.3private int
Region segment bitmap Y location, 7.4.1.4 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
int
int
int
void
init
(SegmentHeader header, SubInputStream sis) Parse the stream and read information of header.void
private void
void
setBitmapHeight
(int bitmapHeight) void
setBitmapWidth
(int bitmapWidth)
-
Field Details
-
subInputStream
-
bitmapWidth
private int bitmapWidthRegion segment bitmap width, 7.4.1.1 -
bitmapHeight
private int bitmapHeightRegion segment bitmap height, 7.4.1.2 -
xLocation
private int xLocationRegion segment bitmap X location, 7.4.1.3 -
yLocation
private int yLocationRegion segment bitmap Y location, 7.4.1.4 -
combinationOperator
Region segment flags, 7.4.1.5
-
-
Constructor Details
-
RegionSegmentInformation
-
RegionSegmentInformation
public RegionSegmentInformation()
-
-
Method Details
-
parseHeader
- Throws:
IOException
-
readCombinationOperator
- Throws:
IOException
-
init
public void init(SegmentHeader header, SubInputStream sis) throws InvalidHeaderValueException, IntegerMaxValueException, IOException Description copied from interface:SegmentData
Parse the stream and read information of header.- Specified by:
init
in interfaceSegmentData
- Parameters:
header
- - The segments' header (to make referred-to segments available in data part).sis
- - WrappedImageInputStream
intoSubInputStream
.- Throws:
InvalidHeaderValueException
- if the segment header value is invalidIntegerMaxValueException
- if the maximum value limit of an integer is exceededIOException
- if an underlying IO operation fails
-
setBitmapWidth
public void setBitmapWidth(int bitmapWidth) -
getBitmapWidth
public int getBitmapWidth() -
setBitmapHeight
public void setBitmapHeight(int bitmapHeight) -
getBitmapHeight
public int getBitmapHeight() -
getXLocation
public int getXLocation() -
getYLocation
public int getYLocation() -
getCombinationOperator
-