Package org.apache.pdfbox.jbig2.segments
Class RegionSegmentInformation
- java.lang.Object
-
- org.apache.pdfbox.jbig2.segments.RegionSegmentInformation
-
- All Implemented Interfaces:
SegmentData
public class RegionSegmentInformation extends java.lang.Object implements SegmentData
This class represents the "Region segment information" field, 7.4.1 (page 50).
Every region segment data starts with this part.
-
-
Field Summary
Fields Modifier and Type Field Description private int
bitmapHeight
Region segment bitmap height, 7.4.1.2private int
bitmapWidth
Region segment bitmap width, 7.4.1.1private CombinationOperator
combinationOperator
Region segment flags, 7.4.1.5private SubInputStream
subInputStream
private int
xLocation
Region segment bitmap X location, 7.4.1.3private int
yLocation
Region segment bitmap Y location, 7.4.1.4
-
Constructor Summary
Constructors Constructor Description RegionSegmentInformation()
RegionSegmentInformation(SubInputStream subInputStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getBitmapHeight()
int
getBitmapWidth()
CombinationOperator
getCombinationOperator()
int
getXLocation()
int
getYLocation()
void
init(SegmentHeader header, SubInputStream sis)
Parse the stream and read information of header.void
parseHeader()
private void
readCombinationOperator()
void
setBitmapHeight(int bitmapHeight)
void
setBitmapWidth(int bitmapWidth)
-
-
-
Field Detail
-
subInputStream
private SubInputStream subInputStream
-
bitmapWidth
private int bitmapWidth
Region segment bitmap width, 7.4.1.1
-
bitmapHeight
private int bitmapHeight
Region segment bitmap height, 7.4.1.2
-
xLocation
private int xLocation
Region segment bitmap X location, 7.4.1.3
-
yLocation
private int yLocation
Region segment bitmap Y location, 7.4.1.4
-
combinationOperator
private CombinationOperator combinationOperator
Region segment flags, 7.4.1.5
-
-
Constructor Detail
-
RegionSegmentInformation
public RegionSegmentInformation(SubInputStream subInputStream)
-
RegionSegmentInformation
public RegionSegmentInformation()
-
-
Method Detail
-
parseHeader
public void parseHeader() throws java.io.IOException
- Throws:
java.io.IOException
-
readCombinationOperator
private void readCombinationOperator() throws java.io.IOException
- Throws:
java.io.IOException
-
init
public void init(SegmentHeader header, SubInputStream sis) throws InvalidHeaderValueException, IntegerMaxValueException, java.io.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 exceededjava.io.IOException
- 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
public CombinationOperator getCombinationOperator()
-
-