Class PDFCCITTFaxProducer
- java.lang.Object
 - 
- java.io.OutputStream
 - 
- com.inductiveautomation.rm.pdf.reader.PDFCCITTFaxProducer
 
 
 
- 
- All Implemented Interfaces:
 java.awt.image.ImageProducer,java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
public class PDFCCITTFaxProducer extends java.io.OutputStream implements java.awt.image.ImageProducerThis 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
Constructors Constructor Description PDFCCITTFaxProducer(RBCodecCCITTFaxDecode decoder)Create a new image producer for the codec. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddConsumer(java.awt.image.ImageConsumer ic)ImageProducer method - add a new consumervoidflush()RBCodecCCITTFaxDecodegetCodec()returns the decoder, should you need it.booleanisConsumer(java.awt.image.ImageConsumer ic)ImageProducer method - check to see if we are sending bits to icvoidproduce()The blood & gutsvoidremoveConsumer(java.awt.image.ImageConsumer ic)ImageProducer methodvoidrequestTopDownLeftRightResend(java.awt.image.ImageConsumer ic)ImageProducer method - send all the bits to the given consumervoidstartProduction(java.awt.image.ImageConsumer ic)ImageProducer method - kicks things off.voidwrite(byte[] b)voidwrite(int b) 
 - 
 
- 
- 
Constructor Detail
- 
PDFCCITTFaxProducer
public PDFCCITTFaxProducer(RBCodecCCITTFaxDecode decoder)
Create a new image producer for the codec. 
 - 
 
- 
Method Detail
- 
addConsumer
public void addConsumer(java.awt.image.ImageConsumer ic)
ImageProducer method - add a new consumer- Specified by:
 addConsumerin interfacejava.awt.image.ImageProducer
 
- 
isConsumer
public boolean isConsumer(java.awt.image.ImageConsumer ic)
ImageProducer method - check to see if we are sending bits to ic- Specified by:
 isConsumerin interfacejava.awt.image.ImageProducer
 
- 
removeConsumer
public void removeConsumer(java.awt.image.ImageConsumer ic)
ImageProducer method- Specified by:
 removeConsumerin interfacejava.awt.image.ImageProducer
 
- 
startProduction
public void startProduction(java.awt.image.ImageConsumer ic)
ImageProducer method - kicks things off.- Specified by:
 startProductionin interfacejava.awt.image.ImageProducer
 
- 
requestTopDownLeftRightResend
public void requestTopDownLeftRightResend(java.awt.image.ImageConsumer ic)
ImageProducer method - send all the bits to the given consumer- Specified by:
 requestTopDownLeftRightResendin interfacejava.awt.image.ImageProducer
 
- 
produce
public void produce()
The blood & guts 
- 
getCodec
public RBCodecCCITTFaxDecode getCodec()
returns the decoder, should you need it. 
- 
write
public void write(byte[] b) throws java.io.IOException- Overrides:
 writein classjava.io.OutputStream- Throws:
 java.io.IOException
 
- 
flush
public void flush() throws java.io.IOException- Specified by:
 flushin interfacejava.io.Flushable- Overrides:
 flushin classjava.io.OutputStream- Throws:
 java.io.IOException
 
- 
write
public void write(int b) throws java.io.IOException- Specified by:
 writein classjava.io.OutputStream- Throws:
 java.io.IOException
 
 - 
 
 -