Package org.apache.pdfbox.jbig2.segments
Class PageInformation
- java.lang.Object
-
- org.apache.pdfbox.jbig2.segments.PageInformation
-
- All Implemented Interfaces:
SegmentData
public class PageInformation extends java.lang.Object implements SegmentData
This class represents the segment type "Page information", 7.4.8 (page 73).
-
-
Field Summary
Fields Modifier and Type Field Description private intbitmapHeightPage bitmap height, four byte, 7.4.8.2private intbitmapWidthPage bitmap width, four byte, 7.4.8.1private CombinationOperatorcombinationOperatorprivate booleancombinationOperatorOverrideAllowedPage segment flags, one byte, 7.4.8.5private shortdefaultPixelValueprivate booleanisLosslessprivate booleanisStripedPage striping information, two byte, 7.4.8.6private shortmaxStripeSizeprivate booleanmightContainRefinementsprivate booleanrequiresAuxiliaryBufferprivate intresolutionXPage X resolution, four byte, 7.4.8.3private intresolutionYPage Y resolution, four byte, 7.4.8.4private SubInputStreamsubInputStream
-
Constructor Summary
Constructors Constructor Description PageInformation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intgetBitmapHeight()protected intgetBitmapWidth()CombinationOperatorgetCombinationOperator()shortgetDefaultPixelValue()intgetHeight()shortgetMaxStripeSize()intgetResolutionX()intgetResolutionY()intgetWidth()voidinit(SegmentHeader header, SubInputStream sis)Parse the stream and read information of header.booleanisAuxiliaryBufferRequired()booleanisCombinationOperatorOverrideAllowed()booleanisLossless()booleanisStriped()booleanmightContainRefinements()private voidparseHeader()private voidreadCombinationOperator()private voidreadCombinationOperatorOverrideAllowed()private voidreadContainsRefinement()private voidreadDefaultPixelvalue()private voidreadIsLossless()private voidreadIsStriped()private voidreadMaxStripeSize()private voidreadRequiresAuxiliaryBuffer()private voidreadResolution()private voidreadWidthAndHeight()
-
-
-
Field Detail
-
subInputStream
private SubInputStream subInputStream
-
bitmapWidth
private int bitmapWidth
Page bitmap width, four byte, 7.4.8.1
-
bitmapHeight
private int bitmapHeight
Page bitmap height, four byte, 7.4.8.2
-
resolutionX
private int resolutionX
Page X resolution, four byte, 7.4.8.3
-
resolutionY
private int resolutionY
Page Y resolution, four byte, 7.4.8.4
-
combinationOperatorOverrideAllowed
private boolean combinationOperatorOverrideAllowed
Page segment flags, one byte, 7.4.8.5
-
combinationOperator
private CombinationOperator combinationOperator
-
requiresAuxiliaryBuffer
private boolean requiresAuxiliaryBuffer
-
defaultPixelValue
private short defaultPixelValue
-
mightContainRefinements
private boolean mightContainRefinements
-
isLossless
private boolean isLossless
-
isStriped
private boolean isStriped
Page striping information, two byte, 7.4.8.6
-
maxStripeSize
private short maxStripeSize
-
-
Method Detail
-
parseHeader
private void parseHeader() throws java.io.IOException, InvalidHeaderValueException- Throws:
java.io.IOExceptionInvalidHeaderValueException
-
readResolution
private void readResolution() throws java.io.IOException- Throws:
java.io.IOException
-
readCombinationOperatorOverrideAllowed
private void readCombinationOperatorOverrideAllowed() throws java.io.IOException- Throws:
java.io.IOException
-
readRequiresAuxiliaryBuffer
private void readRequiresAuxiliaryBuffer() throws java.io.IOException- Throws:
java.io.IOException
-
readCombinationOperator
private void readCombinationOperator() throws java.io.IOException- Throws:
java.io.IOException
-
readDefaultPixelvalue
private void readDefaultPixelvalue() throws java.io.IOException- Throws:
java.io.IOException
-
readContainsRefinement
private void readContainsRefinement() throws java.io.IOException- Throws:
java.io.IOException
-
readIsLossless
private void readIsLossless() throws java.io.IOException- Throws:
java.io.IOException
-
readIsStriped
private void readIsStriped() throws java.io.IOException- Throws:
java.io.IOException
-
readMaxStripeSize
private void readMaxStripeSize() throws java.io.IOException- Throws:
java.io.IOException
-
readWidthAndHeight
private void readWidthAndHeight() throws java.io.IOException- Throws:
java.io.IOException
-
init
public void init(SegmentHeader header, SubInputStream sis) throws InvalidHeaderValueException, java.io.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 invalidjava.io.IOException- if an underlying IO operation fails
-
getWidth
public int getWidth()
-
getHeight
public int getHeight()
-
getResolutionX
public int getResolutionX()
-
getResolutionY
public int getResolutionY()
-
getDefaultPixelValue
public short getDefaultPixelValue()
-
isCombinationOperatorOverrideAllowed
public boolean isCombinationOperatorOverrideAllowed()
-
getCombinationOperator
public CombinationOperator getCombinationOperator()
-
isStriped
public boolean isStriped()
-
getMaxStripeSize
public short getMaxStripeSize()
-
isAuxiliaryBufferRequired
public boolean isAuxiliaryBufferRequired()
-
mightContainRefinements
public boolean mightContainRefinements()
-
isLossless
public boolean isLossless()
-
getBitmapWidth
protected int getBitmapWidth()
-
getBitmapHeight
protected int getBitmapHeight()
-
-