|
xmlgraphics-commons 2.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.xmlgraphics.image.loader.util.ImageUtil
public final class ImageUtil
Helper and convenience methods for working with the image package.
| Method Summary | |
|---|---|
static InputStream |
autoDecorateInputStream(InputStream in)
Automatically decorates an InputStream so it is buffered. |
static void |
closeQuietly(Source src)
Deprecated. use XmlSourceUtil.closeQuietly(Source) instead |
static InputStream |
decorateMarkSupported(InputStream in)
Decorates an InputStream with a BufferedInputStream if it doesn't support mark()/reset(). |
static Map |
getDefaultHints(ImageSessionContext session)
Creates a new hint Map with values from the FOUserAgent. |
static ImageInputStream |
getImageInputStream(Source src)
Returns the ImageInputStream of a Source object. |
static InputStream |
getInputStream(Source src)
Deprecated. Please use XmlSourceUtil.getInputStream(Source) instead. |
static Integer |
getPageIndexFromURI(String uri)
Extracts page index information from a URI. |
static boolean |
hasImageInputStream(Source src)
Indicates whether the Source object has an ImageInputStream instance. |
static boolean |
hasInputStream(Source src)
Indicates whether the Source object has an InputStream instance. |
static boolean |
hasReader(Source src)
Deprecated. use XmlSourceUtil.hasReader(Source) instead |
static ImageInputStream |
ignoreFlushing(ImageInputStream in)
Decorates an ImageInputStream so the flush*() methods are ignored and have no effect. |
static boolean |
isGZIPCompressed(InputStream in)
Indicates whether an InputStream is GZIP compressed. |
static ImageInputStream |
needImageInputStream(Source src)
Returns the ImageInputStream of a Source object. |
static InputStream |
needInputStream(Source src)
Deprecated. use XmlSourceUtil.needInputStream(Source) instead |
static int |
needPageIndexFromURI(String uri)
Extracts page index information from a URI. |
static void |
removeStreams(Source src)
Deprecated. use XmlSourceUtil.removeStreams(Source) instead |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
@Deprecated public static InputStream getInputStream(Source src)
XmlSourceUtil.getInputStream(Source) instead.
src - the Source object
public static ImageInputStream getImageInputStream(Source src)
src - the Source object
@Deprecated public static InputStream needInputStream(Source src)
XmlSourceUtil.needInputStream(Source) instead
src - the Source object
public static ImageInputStream needImageInputStream(Source src)
src - the Source object
public static boolean hasInputStream(Source src)
src - the Source object
@Deprecated public static boolean hasReader(Source src)
XmlSourceUtil.hasReader(Source) instead
src - the Source object
public static boolean hasImageInputStream(Source src)
src - the Source object
@Deprecated public static void removeStreams(Source src)
XmlSourceUtil.removeStreams(Source) instead
src - the Source object@Deprecated public static void closeQuietly(Source src)
XmlSourceUtil.closeQuietly(Source) instead
src - the Source objectpublic static ImageInputStream ignoreFlushing(ImageInputStream in)
in - the ImageInputStream
public static boolean isGZIPCompressed(InputStream in)
throws IOException
in - the InputStream (must return true on markSupported())
IOException - in case of an I/O errorpublic static InputStream decorateMarkSupported(InputStream in)
in - the InputStream
public static InputStream autoDecorateInputStream(InputStream in)
throws IOException
in - the InputStream
IOException - in case of an I/O errorpublic static Map getDefaultHints(ImageSessionContext session)
session - the session context
public static Integer getPageIndexFromURI(String uri)
http://www.foo.bar/images/scan1.tif#page=4 (The method will return
3.)
If no page index information is found in the URI or if the URI cannot be parsed, the method returns null.
uri - the URI that should be inspected
public static int needPageIndexFromURI(String uri)
http://www.foo.bar/images/scan1.tif#page=4 (The method will return
3.)
If no page index information is found in the URI, the method just returns 0 which indicates the first page.
uri - the URI that should be inspected
|
xmlgraphics-commons 2.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||