Class ImageSource

  • All Implemented Interfaces:
    Source

    public class ImageSource
    extends Object
    implements Source
    Acts as a holder for the input to image loading operations.
    • Constructor Detail

      • ImageSource

        public ImageSource​(ImageInputStream in,
                           String systemId,
                           boolean fastSource)
        Main constructor.
        Parameters:
        in - the ImageInputStream to load from
        systemId - the system identifier (resolved URI) of the image
        fastSource - true if it's a fast source (accessing local files)
    • Method Detail

      • getInputStream

        public InputStream getInputStream()
        Returns an InputStream which operates on the underlying ImageInputStream.
        Returns:
        the InputStream or null if the stream has been closed
      • getImageInputStream

        public ImageInputStream getImageInputStream()
        Returns the ImageInputStream.
        Returns:
        the ImageInputStream or null if the stream has been closed
      • setImageInputStream

        public void setImageInputStream​(ImageInputStream in)
        Sets the ImageInputStream.
        Parameters:
        in - the ImageInputStream
      • isFastSource

        public boolean isFastSource()
        Indicates whether this ImageSource is a fast source, i.e. accesses local files rather than network resources.
        Returns:
        true if it's a fast source