Class IIOInputStreamAdapter

java.lang.Object
java.io.InputStream
com.twelvemonkeys.imageio.util.IIOInputStreamAdapter
All Implemented Interfaces:
Closeable, AutoCloseable

class IIOInputStreamAdapter extends InputStream
IIOInputStreamAdapter

Note: You should always wrap this stream in a BufferedInputStream. If not, performance may degrade significantly.

Version:
$Id: IIOInputStreamAdapter.java,v 1.0 Sep 26, 2007 11:35:59 AM haraldk Exp$
  • Field Details

    • input

      private ImageInputStream input
    • hasLength

      private final boolean hasLength
    • left

      private long left
    • markPosition

      private long markPosition
  • Constructor Details

    • IIOInputStreamAdapter

      public IIOInputStreamAdapter(ImageInputStream pInput)
      Creates an InputStream that reads from the given ImageInputStream. The input stream will read from the current stream position, until the end of the underlying stream.
      Parameters:
      pInput - the ImageInputStream to read from.
    • IIOInputStreamAdapter

      public IIOInputStreamAdapter(ImageInputStream pInput, long pLength)
      Creates an InputStream that reads from the given ImageInputStream. The input stream will read from the current stream position, until at most pLength bytes has been read.
      Parameters:
      pInput - the ImageInputStream to read from.
      pLength - the length of the stream
    • IIOInputStreamAdapter

      private IIOInputStreamAdapter(ImageInputStream pInput, long pLength, boolean pHasLength)
  • Method Details