|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.desy.acop.video.timageio.TImageIO
public final class TImageIO
A class containing static convenience methods for performing simple encoding and decoding of Tine image.
| Method Summary | |
|---|---|
static TBufferedImage |
read(java.io.File input)
Returns a TBufferedImage as the result of decoding a
supplied Filewith an ImageReader chosen automatically from among those
currently registered. |
static TBufferedImage |
read(javax.imageio.stream.ImageInputStream stream)
Returns a TBufferedImage as the result of decoding a
supplied ImageInputStreamwith an ImageReader chosen automatically from among those
currently registered.If no registered ImageReader claims to be able to read the
stream, null is returned. |
static TBufferedImage |
read(java.io.InputStream input)
Returns a TBufferedImage as the result of decoding a
supplied InputStreamwith an ImageReader chosen automatically from among those
currently registered.The InputStream is wrapped in an
ImageInputStream.If no registered ImageReader claims to be able to read the
resulting stream, null is returned. |
static TBufferedImage |
read(java.net.URL input)
Returns a TBufferedImage as the result of decoding a
supplied URLwith an ImageReader chosen automatically from among those
currently registered.An InputStream is obtained from the URL, which
is wrapped in an ImageInputStream.If no registered ImageReader claims to be able to read the
resulting stream, null is returned. |
static boolean |
write(TBufferedImage tbi,
java.io.File output)
|
static boolean |
write(TBufferedImage tbi,
javax.imageio.stream.ImageOutputStream output)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static TBufferedImage read(java.io.File input)
throws java.io.IOException
TBufferedImage as the result of decoding a
supplied FileImageReader chosen automatically from among those
currently registered.
Note that there is no read method that takes a filename as a
String;
use this method instead after creating a File from the
filename.
input - a File to read from.
TBufferedImage containing the decoded contents of
the input, or null.
java.lang.NullPointerException - if input is null.
java.io.IOException - if an error occurs during reading.
public static TBufferedImage read(java.io.InputStream input)
throws java.io.IOException
TBufferedImage as the result of decoding a
supplied InputStreamImageReader chosen automatically from among those
currently registered.InputStream is wrapped in an
ImageInputStream.ImageReader claims to be able to read the
resulting stream, null is returned.
The current cache settings from getUseCacheand
getCacheDirectory
will be used to control caching in the ImageInputStream that
is created.
This method does not attempt to locate ImageReaders that can
read directly from an InputStream;
that may be accomplished using IIORegistry and
ImageReaderSpi.
This method does not close the provided InputStream
after the read operation has completed;
it is the responsibility of the caller to close the stream, if desired.
input - an InputStream to read from.
TBufferedImage containing the decoded contents of
the input, or null.
java.lang.NullPointerException - if input is null.
java.io.IOException - if an error occurs during reading.
public static TBufferedImage read(java.net.URL input)
throws java.io.IOException
TBufferedImage as the result of decoding a
supplied URLImageReader chosen automatically from among those
currently registered.InputStream is obtained from the URL, which
is wrapped in an ImageInputStream.ImageReader claims to be able to read the
resulting stream, null is returned.
The current cache settings from getUseCacheand
getCacheDirectory
will be used to control caching in the ImageInputStream that
is created.
This method does not attempt to locate ImageReaders that can
read directly from a URL; that may be accomplished using
IIORegistry and ImageReaderSpi.
input - a URL to read from.
TBufferedImage containing the decoded contents of
the input, or null.
java.lang.NullPointerException - if input is null.
java.io.IOException - if an error occurs during reading.
public static TBufferedImage read(javax.imageio.stream.ImageInputStream stream)
throws java.io.IOException
TBufferedImage as the result of decoding a
supplied ImageInputStreamImageReader chosen automatically from among those
currently registered.ImageReader claims to be able to read the
stream, null is returned.
Unlike most other methods in this class, this method does close
the provided ImageInputStream
after the read operation has completed, unless null is
returned,
in which case this method does not close the stream.
stream - an ImageInputStream to read from.
TBufferedImage containing the decoded contents of
the input, or null.
java.lang.NullPointerException - if stream is null.
java.io.IOException - if an error occurs during reading.
public static boolean write(TBufferedImage tbi,
java.io.File output)
throws java.io.IOException
java.io.IOException
public static boolean write(TBufferedImage tbi,
javax.imageio.stream.ImageOutputStream output)
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||