Class PatternDictionary
java.lang.Object
org.apache.pdfbox.jbig2.segments.PatternDictionary
- All Implemented Interfaces:
Dictionary, SegmentData
This class represents the segment type "Pattern dictionary", 7.4.4.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis method decodes a pattern dictionary segment and returns an array ofBitmaps.protected intprotected shortprotected shortprotected bytevoidinit(SegmentHeader header, SubInputStream sis) Parse the stream and read information of header.protected boolean
-
Constructor Details
-
PatternDictionary
public PatternDictionary()
-
-
Method Details
-
getDictionary
This method decodes a pattern dictionary segment and returns an array ofBitmaps. Each of thisBitmaps is a pattern.
The procedure is described in 6.7.5 (page 43).- Specified by:
getDictionaryin interfaceDictionary- Returns:
- An array of
Bitmaps as result of the decoding procedure. - Throws:
IOException- if an underlying IO operation failsInvalidHeaderValueException- if the segment header value is invalid
-
init
public void init(SegmentHeader header, SubInputStream sis) throws InvalidHeaderValueException, 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 invalidIOException- if an underlying IO operation fails
-
isMMREncoded
protected boolean isMMREncoded() -
getHdTemplate
protected byte getHdTemplate() -
getHdpWidth
protected short getHdpWidth() -
getHdpHeight
protected short getHdpHeight() -
getGrayMax
protected int getGrayMax()
-