com.sun.media.imageio.stream.package.html Maven / Gradle / Ivy
Show all versions of jai-imageio-core Show documentation
Provides ImageInputStream
and ImageOutputStream
classes for use with the Java Image I/O Framework. The
FileChannel
-based classes use the new I/O {@link java.nio}
package to accelerate reading and writing of image data.
FileChannelImageInputStream
FileChannelImageInputStream
uses memory mapping and NIO view
Buffer
s to perform its data reading. It may be created by direct
instantiation given a FileChannel
or via the Java Image I/O
plug-in mechanism, for example from
ImageIO.createImageInputStream()
.
A service provider is also registered which creates an
ImageInputStream
given a
{@link java.nio.channels.ReadableByteChannel}. If the
ReadableByteChannel
is a
FileChannel
then the ImageInputStream
will be a
FileChannelImageInputStream
. Otherwise an
InputStream
will be derived from the Channel
and
wrapped by a FileCacheImageInputStream
if a disk cache is being
used and does not cause a security violation, or a
MemoryCacheImageInputStream
if disk caching is disabled or not
permitted.
FileChannelImageOutputStream
FileChannelImageOutputStream
uses memory mapping and NIO view
Buffer
s to perform its data reading and direct NIO and view
Buffer
s to perform its data writing. It may be created by direct
instantiation given a FileChannel
or via the Java Image I/O
plug-in mechanism, for example from
ImageIO.createImageOutputStream()
.
A service provider is also registered which creates an
ImageOutputStream
given a
{@link java.nio.channels.WritableByteChannel}. If the
WritableByteChannel
is a
FileChannel
which has been opened for both reading and writing,
then the ImageOutputStream
will be a
FileChannelImageOutputStream
. Otherwise an
OutputStream
will be derived from the Channel
and
wrapped by a FileCacheImageOutputStream
if a disk cache is being
used and does not cause a security violation, or a
MemoryCacheImageOutputStream
if disk caching is disabled or not
permitted.
RawImageInputStream
A RawImageInputStream
provides a data input source for the
"raw" image format ImageReader
plug-in. The
RawImageInputStream
constructor which requires an
{@link org.xml.sax.InputSource} parameter allows an application to use
a pre-established XML description of the raw image file. This may be useful
in cases where groups of files have the same layout in which case identical
or similar XML description files may be re-used. Such a description file
would be used to create a FileInputStream
from which the
InputSource
would be created.
SegmentedImageInputStream
A SegmentedImageInputStream
provides a contiguous view of
another ImageInputStream
which itself consists of a sequence of
discontiguous segments containing the image data of interest. Such a stream
may be used for example in conjunction with a RawImageInputStream
to enable reading from a data source which has non-image data interspersed
with the image data. For example, an image could be stored in a line-oriented
fashion with prefix data such as a time stamp embedded in each line.
@since 1.0