Class PDFCCITTFaxProducer
java.lang.Object
java.io.OutputStream
com.inductiveautomation.rm.pdf.reader.PDFCCITTFaxProducer
- All Implemented Interfaces:
ImageProducer,Closeable,Flushable,AutoCloseable
This class is an image producer that uses the RBCodecCCITTFaxDecoder to produce the bits of a 1bpp monochrome image.
This is used as an optimization for when decoding the entire image at once would be too expensive.
Instead of holding on to all the bytes of a decompressed 8bpp BufferedImage,
this class holds on to the compressed bit stream and produces the image as needed.
-
Constructor Summary
ConstructorsConstructorDescriptionPDFCCITTFaxProducer(RBCodecCCITTFaxDecode decoder) Create a new image producer for the codec. -
Method Summary
Modifier and TypeMethodDescriptionvoidImageProducer method - add a new consumervoidflush()getCodec()returns the decoder, should you need it.booleanImageProducer method - check to see if we are sending bits to icvoidproduce()The blood & gutsvoidImageProducer methodvoidImageProducer method - send all the bits to the given consumervoidImageProducer method - kicks things off.voidwrite(byte[] b) voidwrite(int b) Methods inherited from class java.io.OutputStream
close, nullOutputStream, write
-
Constructor Details
-
PDFCCITTFaxProducer
Create a new image producer for the codec.
-
-
Method Details
-
addConsumer
ImageProducer method - add a new consumer- Specified by:
addConsumerin interfaceImageProducer
-
isConsumer
ImageProducer method - check to see if we are sending bits to ic- Specified by:
isConsumerin interfaceImageProducer
-
removeConsumer
ImageProducer method- Specified by:
removeConsumerin interfaceImageProducer
-
startProduction
ImageProducer method - kicks things off.- Specified by:
startProductionin interfaceImageProducer
-
requestTopDownLeftRightResend
ImageProducer method - send all the bits to the given consumer- Specified by:
requestTopDownLeftRightResendin interfaceImageProducer
-
produce
public void produce()The blood & guts -
getCodec
returns the decoder, should you need it. -
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
write
- Specified by:
writein classOutputStream- Throws:
IOException
-