Class ImageSource

java.lang.Object
org.apache.xmlgraphics.image.loader.ImageSource
All Implemented Interfaces:
Source

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

    • 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 Details

    • 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
    • getSystemId

      public String getSystemId()
      Specified by:
      getSystemId in interface Source
    • setSystemId

      public void setSystemId(String systemId)
      Specified by:
      setSystemId in interface Source
    • 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
    • toString

      public String toString()
      Overrides:
      toString in class Object