public class JBIG2Decoder extends Object
| Constructor and Description |
|---|
JBIG2Decoder()
Constructor for jbig
|
| Modifier and Type | Method and Description |
|---|---|
void |
decodeJBIG2(byte[] data)
Decodes a JBIG2 image from a byte array
|
void |
decodeJBIG2(DataInput dataInput)
Decodes a JBIG2 image from a DataInput
|
void |
decodeJBIG2(File file)
Decodes a JBIG2 image from a File object
|
void |
decodeJBIG2(InputStream inputStream)
Decodes a JBIG2 image from an InputStream
|
void |
decodeJBIG2(String file)
Decodes a JBIG2 image from a String path
|
PageInformationSegment |
findPageSegement(int page) |
Segment |
findSegment(int segmentNumber) |
List |
getAllSegments() |
int |
getNumberOfPages() |
BufferedImage |
getPageAsBufferedImage(int page) |
JBIG2Bitmap |
getPageAsJBIG2Bitmap(int page) |
boolean |
isNumberOfPagesKnown() |
boolean |
isRandomAccessOrganisationUsed() |
void |
setGlobalData(byte[] data)
If the data stream is taken from a PDF, there may be some global data.
|
public void setGlobalData(byte[] data)
throws IOException,
JBIG2Exception
data - global dataIOExceptionJBIG2Exceptionpublic void decodeJBIG2(File file) throws IOException, JBIG2Exception
file - File to decodeIOExceptionJBIG2Exceptionpublic void decodeJBIG2(String file) throws IOException, JBIG2Exception
file - Must be the full path to the imageIOExceptionJBIG2Exceptionpublic void decodeJBIG2(InputStream inputStream) throws IOException, JBIG2Exception
inputStream - InputStreamIOExceptionJBIG2Exceptionpublic void decodeJBIG2(DataInput dataInput) throws IOException, JBIG2Exception
dataInput - DataInputIOExceptionJBIG2Exceptionpublic void decodeJBIG2(byte[] data)
throws IOException,
JBIG2Exception
data - the raw data streamIOExceptionJBIG2Exceptionpublic BufferedImage getPageAsBufferedImage(int page)
page - public boolean isNumberOfPagesKnown()
public int getNumberOfPages()
public List getAllSegments()
public PageInformationSegment findPageSegement(int page)
public Segment findSegment(int segmentNumber)
public JBIG2Bitmap getPageAsJBIG2Bitmap(int page)
public boolean isRandomAccessOrganisationUsed()
Copyright © 2017. All rights reserved.