Class TextRegion
java.lang.Object
org.apache.pdfbox.jbig2.segments.TextRegion
- All Implemented Interfaces:
Region, SegmentData
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDecodes and returns a regions content.Simply returns theRegionSegmentInformation.voidinit(SegmentHeader header, SubInputStream sis) Parse the stream and read information of header.protected voidsetContexts(CX cx, CX cxIADT, CX cxIAFS, CX cxIADS, CX cxIAIT, CX cxIAID, CX cxIARDW, CX cxIARDH, CX cxIARDX, CX cxIARDY) protected voidsetParameters(ArithmeticDecoder arithmeticDecoder, ArithmeticIntegerDecoder iDecoder, boolean isHuffmanEncoded, boolean sbRefine, int sbw, int sbh, long sbNumInstances, int sbStrips, int sbNumSyms, short sbDefaultPixel, short sbCombinationOperator, short transposed, short refCorner, short sbdsOffset, short sbHuffFS, short sbHuffDS, short sbHuffDT, short sbHuffRDWidth, short sbHuffRDHeight, short sbHuffRDX, short sbHuffRDY, short sbHuffRSize, short sbrTemplate, short[] sbrATX, short[] sbrATY, ArrayList<Bitmap> sbSyms, int sbSymCodeLen)
-
Constructor Details
-
TextRegion
public TextRegion() -
TextRegion
-
-
Method Details
-
getRegionBitmap
public Bitmap getRegionBitmap() throws IOException, IntegerMaxValueException, InvalidHeaderValueExceptionDescription copied from interface:RegionDecodes and returns a regions content.- Specified by:
getRegionBitmapin interfaceRegion- Returns:
- The decoded region as
Bitmap. - Throws:
IOException- if an underlying IO operation failsIntegerMaxValueException- if the maximum value limit of an integer is exceededInvalidHeaderValueException- if the segment header value is invalid
-
init
public void init(SegmentHeader header, SubInputStream sis) throws InvalidHeaderValueException, IntegerMaxValueException, IOException Description copied from interface:SegmentDataParse the stream and read information of header.- Specified by:
initin interfaceSegmentData- Parameters:
header- - The segments' header (to make referred-to segments available in data part).sis- - WrappedImageInputStreamintoSubInputStream.- 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
-
setContexts
-
setParameters
protected void setParameters(ArithmeticDecoder arithmeticDecoder, ArithmeticIntegerDecoder iDecoder, boolean isHuffmanEncoded, boolean sbRefine, int sbw, int sbh, long sbNumInstances, int sbStrips, int sbNumSyms, short sbDefaultPixel, short sbCombinationOperator, short transposed, short refCorner, short sbdsOffset, short sbHuffFS, short sbHuffDS, short sbHuffDT, short sbHuffRDWidth, short sbHuffRDHeight, short sbHuffRDX, short sbHuffRDY, short sbHuffRSize, short sbrTemplate, short[] sbrATX, short[] sbrATY, ArrayList<Bitmap> sbSyms, int sbSymCodeLen) -
getRegionInfo
Description copied from interface:RegionSimply returns theRegionSegmentInformation.- Specified by:
getRegionInfoin interfaceRegion- Returns:
- The
RegionSegmentInformation.
-