Class ImageSource
java.lang.Object
org.apache.xmlgraphics.image.loader.ImageSource
- All Implemented Interfaces:
Source
Acts as a holder for the input to image loading operations.
-
Constructor Summary
ConstructorsConstructorDescriptionImageSource
(ImageInputStream in, String systemId, boolean fastSource) Main constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the ImageInputStream.Returns an InputStream which operates on the underlying ImageInputStream.boolean
Indicates whether this ImageSource is a fast source, i.e.void
Sets the ImageInputStream.void
setSystemId
(String systemId) toString()
-
Constructor Details
-
ImageSource
Main constructor.- Parameters:
in
- the ImageInputStream to load fromsystemId
- the system identifier (resolved URI) of the imagefastSource
- true if it's a fast source (accessing local files)
-
-
Method Details
-
getInputStream
Returns an InputStream which operates on the underlying ImageInputStream.- Returns:
- the InputStream or null if the stream has been closed
-
getImageInputStream
Returns the ImageInputStream.- Returns:
- the ImageInputStream or null if the stream has been closed
-
setImageInputStream
Sets the ImageInputStream.- Parameters:
in
- the ImageInputStream
-
getSystemId
- Specified by:
getSystemId
in interfaceSource
-
setSystemId
- Specified by:
setSystemId
in interfaceSource
-
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
-