APIdia Launch Partner
Top Fields Constructors Methods
sun.awt.image

public abstract Class InputStreamImageSource

extends Object
implements ImageProducer, ImageFetchable
Class Inheritance
All Implemented Interfaces
sun.awt.image.ImageFetchable, java.awt.image.ImageProducer
Known Direct Subclasses
sun.awt.image.URLImageSource, sun.awt.image.ByteArrayImageSource, sun.awt.image.FileImageSource
Imports
java.awt.image.*, java.io.InputStream, .IOException, .BufferedInputStream

Field Summary

Modifier and TypeField and Description
pack-priv boolean
pack-priv ImageConsumerQueue
pack-priv ImageDecoder
pack-priv ImageDecoder

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addConsumer(ImageConsumer ic)

Implements java.awt.image.ImageProducer.addConsumer.

Registers an ImageConsumer with the ImageProducer for access to the image data during a later reconstruction of the Image.

pack-priv synchronized void
addConsumer(ImageConsumer ic, boolean produce)

private void
pack-priv int
pack-priv synchronized int
protected ImageDecoder
decoderForType(InputStream is, String content_type)

public void
doFetch()

Implements sun.awt.image.ImageFetchable.doFetch.

This method is called by one of the ImageFetcher threads to start the flow of information from the ImageProducer to the ImageConsumer.

pack-priv synchronized void
private void
errorAllConsumers(ImageConsumerQueue cq, boolean needReload)

private void
errorConsumer(ImageConsumerQueue cq, boolean needReload)

pack-priv synchronized void
protected abstract ImageDecoder
protected ImageDecoder
public synchronized boolean
isConsumer(ImageConsumer ic)

Implements java.awt.image.ImageProducer.isConsumer.

Determines if a specified ImageConsumer object is currently registered with this ImageProducer as one of its consumers.

pack-priv void
pack-priv synchronized void
pack-priv synchronized void
public synchronized void
removeConsumer(ImageConsumer ic)

Implements java.awt.image.ImageProducer.removeConsumer.

Removes the specified ImageConsumer object from the list of consumers currently registered to receive image data.

private synchronized void
public void
requestTopDownLeftRightResend(ImageConsumer ic)

Implements java.awt.image.ImageProducer.requestTopDownLeftRightResend.

Requests, on behalf of the ImageConsumer, that the ImageProducer attempt to resend the image data one more time in TOPDOWNLEFTRIGHT order so that higher quality conversion algorithms which depend on receiving pixels in order can be used to produce a better output version of the image.

private void
public void
startProduction(ImageConsumer ic)

Implements java.awt.image.ImageProducer.startProduction.

Registers the specified ImageConsumer object as a consumer and starts an immediate reconstruction of the image data which will then be delivered to this consumer and any other consumer which might have already been registered with the producer.

private synchronized void
private synchronized void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

awaitingFetchback to summary
pack-priv boolean awaitingFetch
consumersback to summary
pack-priv ImageConsumerQueue consumers
decoderback to summary
pack-priv ImageDecoder decoder
decodersback to summary
pack-priv ImageDecoder decoders

Constructor Detail

InputStreamImageSourceback to summary
public InputStreamImageSource()

Method Detail

addConsumerback to summary
public void addConsumer(ImageConsumer ic)

Implements java.awt.image.ImageProducer.addConsumer.

Doc from java.awt.image.ImageProducer.addConsumer.

Registers an ImageConsumer with the ImageProducer for access to the image data during a later reconstruction of the Image. The ImageProducer may, at its discretion, start delivering the image data to the consumer using the ImageConsumer interface immediately, or when the next available image reconstruction is triggered by a call to the startProduction method.

addConsumerback to summary
pack-priv synchronized void addConsumer(ImageConsumer ic, boolean produce)
badDecoderback to summary
private void badDecoder()
countConsumersback to summary
pack-priv int countConsumers(ImageConsumerQueue cq)
countConsumersback to summary
pack-priv synchronized int countConsumers()
decoderForTypeback to summary
protected ImageDecoder decoderForType(InputStream is, String content_type)
doFetchback to summary
public void doFetch()

Implements sun.awt.image.ImageFetchable.doFetch.

Doc from sun.awt.image.ImageFetchable.doFetch.

This method is called by one of the ImageFetcher threads to start the flow of information from the ImageProducer to the ImageConsumer.

doneDecodingback to summary
pack-priv synchronized void doneDecoding(ImageDecoder mydecoder)
errorAllConsumersback to summary
private void errorAllConsumers(ImageConsumerQueue cq, boolean needReload)
errorConsumerback to summary
private void errorConsumer(ImageConsumerQueue cq, boolean needReload)
flushback to summary
pack-priv synchronized void flush()
getDecoderback to summary
protected abstract ImageDecoder getDecoder()
getDecoderback to summary
protected ImageDecoder getDecoder(InputStream is)
isConsumerback to summary
public synchronized boolean isConsumer(ImageConsumer ic)

Implements java.awt.image.ImageProducer.isConsumer.

Doc from java.awt.image.ImageProducer.isConsumer.

Determines if a specified ImageConsumer object is currently registered with this ImageProducer as one of its consumers.

latchConsumersback to summary
pack-priv void latchConsumers(ImageDecoder id)
printQueueback to summary
pack-priv synchronized void printQueue(ImageConsumerQueue cq, String prefix)
printQueuesback to summary
pack-priv synchronized void printQueues(String title)
removeConsumerback to summary
public synchronized void removeConsumer(ImageConsumer ic)

Implements java.awt.image.ImageProducer.removeConsumer.

Doc from java.awt.image.ImageProducer.removeConsumer.

Removes the specified ImageConsumer object from the list of consumers currently registered to receive image data. It is not considered an error to remove a consumer that is not currently registered. The ImageProducer should stop sending data to this consumer as soon as is feasible.

removeDecoderback to summary
private synchronized void removeDecoder(ImageDecoder mydecoder)
requestTopDownLeftRightResendback to summary
public void requestTopDownLeftRightResend(ImageConsumer ic)

Implements java.awt.image.ImageProducer.requestTopDownLeftRightResend.

Doc from java.awt.image.ImageProducer.requestTopDownLeftRightResend.

Requests, on behalf of the ImageConsumer, that the ImageProducer attempt to resend the image data one more time in TOPDOWNLEFTRIGHT order so that higher quality conversion algorithms which depend on receiving pixels in order can be used to produce a better output version of the image. The ImageProducer is free to ignore this call if it cannot resend the data in that order. If the data can be resent, the ImageProducer should respond by executing the following minimum set of ImageConsumer method calls:

ic.setHints(TOPDOWNLEFTRIGHT | < otherhints >);
 ic.setPixels(...);      // As many times as needed
 ic.imageComplete();
setDecoderback to summary
private void setDecoder(ImageDecoder mydecoder)
startProductionback to summary
public void startProduction(ImageConsumer ic)

Implements java.awt.image.ImageProducer.startProduction.

Doc from java.awt.image.ImageProducer.startProduction.

Registers the specified ImageConsumer object as a consumer and starts an immediate reconstruction of the image data which will then be delivered to this consumer and any other consumer which might have already been registered with the producer. This method differs from the addConsumer method in that a reproduction of the image data should be triggered as soon as possible.

startProductionback to summary
private synchronized void startProduction()
stopProductionback to summary
private synchronized void stopProduction()