Class BufferedImageInputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.io.DataInput, java.lang.AutoCloseable, javax.imageio.stream.ImageInputStream

    @Deprecated
    public final class BufferedImageInputStream
    extends javax.imageio.stream.ImageInputStreamImpl
    implements javax.imageio.stream.ImageInputStream
    Deprecated.
    A buffered ImageInputStream. Experimental - seems to be effective for FileImageInputStream and FileCacheImageInputStream when doing a lot of single-byte reads (or short byte-array reads). Code that uses the readFully methods are not affected by the issue.

    NOTE: Invoking close() will NOT close the wrapped stream.

    Version:
    $Id: BufferedFileImageInputStream.java,v 1.0 May 15, 2008 4:36:49 PM haraldk Exp$
    Author:
    Harald Kuhr, last modified by $Author: haraldk$
    • Field Summary

      • Fields inherited from class javax.imageio.stream.ImageInputStreamImpl

        bitOffset, byteOrder, flushedPos, streamPos
    • Constructor Summary

      Constructors 
      Constructor Description
      BufferedImageInputStream​(javax.imageio.stream.ImageInputStream pStream)
      Deprecated.
       
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void close()
      Deprecated.
       
      protected void finalize()
      Deprecated.
       
      void flushBefore​(long pos)
      Deprecated.
       
      long getFlushedPosition()
      Deprecated.
       
      boolean isCached()
      Deprecated.
       
      boolean isCachedFile()
      Deprecated.
       
      boolean isCachedMemory()
      Deprecated.
       
      long length()
      Deprecated.
       
      int read()
      Deprecated.
       
      int read​(byte[] pBuffer, int pOffset, int pLength)
      Deprecated.
       
      int readBit()
      Deprecated.
       
      long readBits​(int numBits)
      Deprecated.
       
      int readInt()
      Deprecated.
       
      long readLong()
      Deprecated.
       
      short readShort()
      Deprecated.
       
      void seek​(long position)
      Deprecated.
       
      void setByteOrder​(java.nio.ByteOrder byteOrder)
      Deprecated.
       
      • Methods inherited from class javax.imageio.stream.ImageInputStreamImpl

        checkClosed, flush, getBitOffset, getByteOrder, getStreamPosition, mark, read, readBoolean, readByte, readBytes, readChar, readDouble, readFloat, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readLine, readUnsignedByte, readUnsignedInt, readUnsignedShort, readUTF, reset, setBitOffset, skipBytes, skipBytes
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.imageio.stream.ImageInputStream

        flush, getBitOffset, getByteOrder, getStreamPosition, mark, read, readBoolean, readByte, readBytes, readChar, readDouble, readFloat, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readLine, readUnsignedByte, readUnsignedInt, readUnsignedShort, readUTF, reset, setBitOffset, skipBytes, skipBytes
    • Constructor Detail

      • BufferedImageInputStream

        public BufferedImageInputStream​(javax.imageio.stream.ImageInputStream pStream)
                                 throws java.io.IOException
        Deprecated.
        Throws:
        java.io.IOException
    • Method Detail

      • setByteOrder

        public void setByteOrder​(java.nio.ByteOrder byteOrder)
        Deprecated.
        Specified by:
        setByteOrder in interface javax.imageio.stream.ImageInputStream
        Overrides:
        setByteOrder in class javax.imageio.stream.ImageInputStreamImpl
      • read

        public int read()
                 throws java.io.IOException
        Deprecated.
        Specified by:
        read in interface javax.imageio.stream.ImageInputStream
        Specified by:
        read in class javax.imageio.stream.ImageInputStreamImpl
        Throws:
        java.io.IOException
      • read

        public int read​(byte[] pBuffer,
                        int pOffset,
                        int pLength)
                 throws java.io.IOException
        Deprecated.
        Specified by:
        read in interface javax.imageio.stream.ImageInputStream
        Specified by:
        read in class javax.imageio.stream.ImageInputStreamImpl
        Throws:
        java.io.IOException
      • readShort

        public short readShort()
                        throws java.io.IOException
        Deprecated.
        Specified by:
        readShort in interface java.io.DataInput
        Specified by:
        readShort in interface javax.imageio.stream.ImageInputStream
        Overrides:
        readShort in class javax.imageio.stream.ImageInputStreamImpl
        Throws:
        java.io.IOException
      • readInt

        public int readInt()
                    throws java.io.IOException
        Deprecated.
        Specified by:
        readInt in interface java.io.DataInput
        Specified by:
        readInt in interface javax.imageio.stream.ImageInputStream
        Overrides:
        readInt in class javax.imageio.stream.ImageInputStreamImpl
        Throws:
        java.io.IOException
      • readLong

        public long readLong()
                      throws java.io.IOException
        Deprecated.
        Specified by:
        readLong in interface java.io.DataInput
        Specified by:
        readLong in interface javax.imageio.stream.ImageInputStream
        Overrides:
        readLong in class javax.imageio.stream.ImageInputStreamImpl
        Throws:
        java.io.IOException
      • readBit

        public int readBit()
                    throws java.io.IOException
        Deprecated.
        Specified by:
        readBit in interface javax.imageio.stream.ImageInputStream
        Overrides:
        readBit in class javax.imageio.stream.ImageInputStreamImpl
        Throws:
        java.io.IOException
      • readBits

        public long readBits​(int numBits)
                      throws java.io.IOException
        Deprecated.
        Specified by:
        readBits in interface javax.imageio.stream.ImageInputStream
        Overrides:
        readBits in class javax.imageio.stream.ImageInputStreamImpl
        Throws:
        java.io.IOException
      • seek

        public void seek​(long position)
                  throws java.io.IOException
        Deprecated.
        Specified by:
        seek in interface javax.imageio.stream.ImageInputStream
        Overrides:
        seek in class javax.imageio.stream.ImageInputStreamImpl
        Throws:
        java.io.IOException
      • flushBefore

        public void flushBefore​(long pos)
                         throws java.io.IOException
        Deprecated.
        Specified by:
        flushBefore in interface javax.imageio.stream.ImageInputStream
        Overrides:
        flushBefore in class javax.imageio.stream.ImageInputStreamImpl
        Throws:
        java.io.IOException
      • getFlushedPosition

        public long getFlushedPosition()
        Deprecated.
        Specified by:
        getFlushedPosition in interface javax.imageio.stream.ImageInputStream
        Overrides:
        getFlushedPosition in class javax.imageio.stream.ImageInputStreamImpl
      • isCached

        public boolean isCached()
        Deprecated.
        Specified by:
        isCached in interface javax.imageio.stream.ImageInputStream
        Overrides:
        isCached in class javax.imageio.stream.ImageInputStreamImpl
      • isCachedMemory

        public boolean isCachedMemory()
        Deprecated.
        Specified by:
        isCachedMemory in interface javax.imageio.stream.ImageInputStream
        Overrides:
        isCachedMemory in class javax.imageio.stream.ImageInputStreamImpl
      • isCachedFile

        public boolean isCachedFile()
        Deprecated.
        Specified by:
        isCachedFile in interface javax.imageio.stream.ImageInputStream
        Overrides:
        isCachedFile in class javax.imageio.stream.ImageInputStreamImpl
      • close

        public void close()
                   throws java.io.IOException
        Deprecated.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface javax.imageio.stream.ImageInputStream
        Overrides:
        close in class javax.imageio.stream.ImageInputStreamImpl
        Throws:
        java.io.IOException
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Deprecated.
        Overrides:
        finalize in class javax.imageio.stream.ImageInputStreamImpl
        Throws:
        java.lang.Throwable
      • length

        public long length()
        Deprecated.
        Specified by:
        length in interface javax.imageio.stream.ImageInputStream
        Overrides:
        length in class javax.imageio.stream.ImageInputStreamImpl