Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| xmlgraphics-commons 2.3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.xmlgraphics.image.loader
Class ImageSource

    java.lang.Object
      org.apache.xmlgraphics.image.loader.ImageSource

All Implemented Interfaces:
  javax.xml.transform.Source

    public class ImageSource

extends java.lang.Object
implements javax.xml.transform.Source

Acts as a holder for the input to image loading operations.

Constructor Summary
`ImageSource(javax.imageio.stream.ImageInputStream in, java.lang.String systemId, boolean fastSource)` Main constructor.

Method Summary
`javax.imageio.stream.ImageInputStream` | `getImageInputStream()` Returns the ImageInputStream.
`java.io.InputStream` | `getInputStream()` Returns an InputStream which operates on the underlying ImageInputStream.
`java.lang.String` | `getSystemId()`
`boolean` | `isFastSource()` Indicates whether this ImageSource is a fast source, i.e.
`void` | `setImageInputStream(javax.imageio.stream.ImageInputStream in)` Sets the ImageInputStream.
`void` | `setSystemId(java.lang.String systemId)`
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ImageSource

    public ImageSource(javax.imageio.stream.ImageInputStream in,
                       java.lang.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 java.io.InputStream getInputStream()

  Returns an InputStream which operates on the underlying ImageInputStream.

  Returns:
    the InputStream or null if the stream has been closed

### getImageInputStream

    public javax.imageio.stream.ImageInputStream getImageInputStream()

  Returns the ImageInputStream.

  Returns:
    the ImageInputStream or null if the stream has been closed

### setImageInputStream

    public void setImageInputStream(javax.imageio.stream.ImageInputStream in)

  Sets the ImageInputStream.

  Parameters:
    `in` - the ImageInputStream

### getSystemId

    public java.lang.String getSystemId()

  Specified by:
    `getSystemId` in interface `javax.xml.transform.Source`

### setSystemId

    public void setSystemId(java.lang.String systemId)

  Specified by:
    `setSystemId` in interface `javax.xml.transform.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 java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| xmlgraphics-commons 2.3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 1999-2018 The Apache Software Foundation. All Rights Reserved.