Overview | Package | Class | Tree | Deprecated | Index | Help
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES

## Package com.sun.media.imageio.stream

Provides `ImageInputStream` and `ImageOutputStream` classes for use with the Java Image I/O Framework.

See:
Description

Interface Summary
StreamSegmentMapper | An interface for use with the `SegmentedImageInputStream` class.

Class Summary
FileChannelImageInputStream | A class which implements `ImageInputStream` using a `FileChannel` as the eventual data source.
FileChannelImageOutputStream | A class which implements `ImageOutputStream` using a `FileChannel` as the eventual data destination.
RawImageInputStream | This class defines the content of the `ImageInputStream` containing several raw images with the same image type: the number of the images, the image type, the offset for the first sample of each image, and the image size information.
SegmentedImageInputStream | A `SegmentedImageInputStream` provides a view of a subset of another `ImageInputStream` consiting of a series of segments with given starting positions in the source stream and lengths.
StreamSegment | A utility class representing a segment within a stream as a `long` starting position and an `int` length.

## Package com.sun.media.imageio.stream Description

Provides `ImageInputStream` and `ImageOutputStream` classes for use with the Java Image I/O Framework. The `FileChannel`-based classes use the new I/O 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 `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 `WritableByteChannel`. If the `WritableByteChannel` is a `FileChannel` 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 `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

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES