public class JBIG2Decoder
extends java.lang.Object
| Constructor and Description |
|---|
JBIG2Decoder()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
cleanupPostDecode() |
void |
decodeJBIG2(byte[] data)
Decodes a JBIG2 image from a byte array
|
void |
decodeJBIG2(java.io.DataInput dataInput)
Decodes a JBIG2 image from a DataInput
|
void |
decodeJBIG2(java.io.File file)
Decodes a JBIG2 image from a File object
|
void |
decodeJBIG2(java.io.InputStream inputStream)
Decodes a JBIG2 image from an InputStream
|
void |
decodeJBIG2(java.lang.String file)
Decodes a JBIG2 image from a String path
|
PageInformationSegment |
findPageSegement(int page) |
Segment |
findSegment(int segmentNumber) |
java.util.List |
getAllSegments() |
int |
getNumberOfPages() |
java.awt.image.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 java.io.IOException,
JBIG2Exception
data - global datajava.io.IOExceptionJBIG2Exceptionpublic void decodeJBIG2(java.io.File file)
throws java.io.IOException,
JBIG2Exception
file - File to decodejava.io.IOExceptionJBIG2Exceptionpublic void decodeJBIG2(java.lang.String file)
throws java.io.IOException,
JBIG2Exception
file - Must be the full path to the imagejava.io.IOExceptionJBIG2Exceptionpublic void decodeJBIG2(java.io.InputStream inputStream)
throws java.io.IOException,
JBIG2Exception
inputStream - InputStreamjava.io.IOExceptionJBIG2Exceptionpublic void decodeJBIG2(java.io.DataInput dataInput)
throws java.io.IOException,
JBIG2Exception
dataInput - DataInputjava.io.IOExceptionJBIG2Exceptionpublic void decodeJBIG2(byte[] data)
throws java.io.IOException,
JBIG2Exception
data - the raw data streamjava.io.IOExceptionJBIG2Exceptionpublic void cleanupPostDecode()
public java.awt.image.BufferedImage getPageAsBufferedImage(int page)
page - public boolean isNumberOfPagesKnown()
public int getNumberOfPages()
public java.util.List getAllSegments()
public PageInformationSegment findPageSegement(int page)
public Segment findSegment(int segmentNumber)
public JBIG2Bitmap getPageAsJBIG2Bitmap(int page)
public boolean isRandomAccessOrganisationUsed()