Class ImageEncoderImpl

  • All Implemented Interfaces:
    ImageEncoder
    Direct Known Subclasses:
    PNGImageEncoder, TIFFImageEncoder

    public abstract class ImageEncoderImpl
    extends Object
    implements ImageEncoder
    A partial implementation of the ImageEncoder interface useful for subclassing.

    This class is not a committed part of the JAI API. It may be removed or changed in future releases of JAI.

    • Field Detail

      • output

        protected OutputStream output
        The OutputStream associcted with this ImageEncoder.
      • param

        protected ImageEncodeParam param
        The ImageEncodeParam object associcted with this ImageEncoder.
    • Constructor Detail

      • ImageEncoderImpl

        public ImageEncoderImpl​(OutputStream output,
                                ImageEncodeParam param)
        Constructs an ImageEncoderImpl with a given OutputStream and ImageEncoderParam instance.
    • Method Detail

      • getParam

        public ImageEncodeParam getParam()
        Returns the current parameters as an instance of the ImageEncodeParam interface. Concrete implementations of this interface will return corresponding concrete implementations of the ImageEncodeParam interface. For example, a JPEGImageEncoder will return an instance of JPEGEncodeParam.
        Specified by:
        getParam in interface ImageEncoder
      • setParam

        public void setParam​(ImageEncodeParam param)
        Sets the current parameters to an instance of the ImageEncodeParam interface. Concrete implementations of ImageEncoder may throw a RuntimeException if the params argument is not an instance of the appropriate subclass or subinterface. For example, a JPEGImageEncoder will expect param to be an instance of JPEGEncodeParam.
        Specified by:
        setParam in interface ImageEncoder