public final class XmlSourceUtil extends Object
Modifier and Type | Method | Description |
---|---|---|
static void |
closeQuietly(Source src) |
Closes the InputStreams or ImageInputStreams of Source objects.
|
static InputStream |
getInputStream(Source src) |
Returns the
InputStream that is backing the given Source object. |
static boolean |
hasInputStream(Source src) |
Indicates whether the Source object has an InputStream instance.
|
static boolean |
hasReader(Source src) |
Indicates whether the Source object has a Reader instance.
|
static InputStream |
needInputStream(Source src) |
Returns the InputStream of a Source object.
|
static void |
removeStreams(Source src) |
Removes any references to InputStreams or Readers from the given Source to prohibit
accidental/unwanted use by a component further downstream.
|
public static InputStream getInputStream(Source src)
InputStream
that is backing the given Source
object.src
- is backed by an InputStream
public static InputStream needInputStream(Source src)
src
- the Source objectpublic static boolean hasReader(Source src)
src
- the Source objectpublic static void removeStreams(Source src)
src
- the Source objectpublic static void closeQuietly(Source src)
src
- the Source objectpublic static boolean hasInputStream(Source src)
src
- the Source objectCopyright © 2018 Apache Software Foundation. All rights reserved.