Class SeekableImageInputStream

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

    public class SeekableImageInputStream
    extends java.lang.Object
    implements javax.imageio.stream.ImageInputStream
    • Constructor Detail

      • SeekableImageInputStream

        public SeekableImageInputStream​(org.eclipse.imagen.media.codec.SeekableStream seekableStream)
    • Method Detail

      • checkClosed

        protected final void checkClosed()
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • read

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

        public int read​(byte[] b,
                        int off,
                        int len)
                 throws java.io.IOException
        Specified by:
        read in interface javax.imageio.stream.ImageInputStream
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        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
        Throws:
        java.io.IOException
      • setByteOrder

        public void setByteOrder​(java.nio.ByteOrder byteOrder)
        Specified by:
        setByteOrder in interface javax.imageio.stream.ImageInputStream
      • getByteOrder

        public java.nio.ByteOrder getByteOrder()
        Specified by:
        getByteOrder in interface javax.imageio.stream.ImageInputStream
      • read

        public int read​(byte[] b)
                 throws java.io.IOException
        Specified by:
        read in interface javax.imageio.stream.ImageInputStream
        Throws:
        java.io.IOException
      • readBytes

        public void readBytes​(javax.imageio.stream.IIOByteBuffer buf,
                              int len)
                       throws java.io.IOException
        Specified by:
        readBytes in interface javax.imageio.stream.ImageInputStream
        Throws:
        java.io.IOException
      • readBoolean

        public boolean readBoolean()
                            throws java.io.IOException
        Specified by:
        readBoolean in interface java.io.DataInput
        Specified by:
        readBoolean in interface javax.imageio.stream.ImageInputStream
        Throws:
        java.io.IOException
      • readByte

        public byte readByte()
                      throws java.io.IOException
        Specified by:
        readByte in interface java.io.DataInput
        Specified by:
        readByte in interface javax.imageio.stream.ImageInputStream
        Throws:
        java.io.IOException
      • readUnsignedByte

        public int readUnsignedByte()
                             throws java.io.IOException
        Specified by:
        readUnsignedByte in interface java.io.DataInput
        Specified by:
        readUnsignedByte in interface javax.imageio.stream.ImageInputStream
        Throws:
        java.io.IOException
      • readShort

        public short readShort()
                        throws java.io.IOException
        Specified by:
        readShort in interface java.io.DataInput
        Specified by:
        readShort in interface javax.imageio.stream.ImageInputStream
        Throws:
        java.io.IOException
      • readUnsignedShort

        public int readUnsignedShort()
                              throws java.io.IOException
        Specified by:
        readUnsignedShort in interface java.io.DataInput
        Specified by:
        readUnsignedShort in interface javax.imageio.stream.ImageInputStream
        Throws:
        java.io.IOException
      • readChar

        public char readChar()
                      throws java.io.IOException
        Specified by:
        readChar in interface java.io.DataInput
        Specified by:
        readChar in interface javax.imageio.stream.ImageInputStream
        Throws:
        java.io.IOException
      • readInt

        public int readInt()
                    throws java.io.IOException
        Specified by:
        readInt in interface java.io.DataInput
        Specified by:
        readInt in interface javax.imageio.stream.ImageInputStream
        Throws:
        java.io.IOException
      • readUnsignedInt

        public long readUnsignedInt()
                             throws java.io.IOException
        Specified by:
        readUnsignedInt in interface javax.imageio.stream.ImageInputStream
        Throws:
        java.io.IOException
      • readLong

        public long readLong()
                      throws java.io.IOException
        Specified by:
        readLong in interface java.io.DataInput
        Specified by:
        readLong in interface javax.imageio.stream.ImageInputStream
        Throws:
        java.io.IOException
      • readFloat

        public float readFloat()
                        throws java.io.IOException
        Specified by:
        readFloat in interface java.io.DataInput
        Specified by:
        readFloat in interface javax.imageio.stream.ImageInputStream
        Throws:
        java.io.IOException
      • readDouble

        public double readDouble()
                          throws java.io.IOException
        Specified by:
        readDouble in interface java.io.DataInput
        Specified by:
        readDouble in interface javax.imageio.stream.ImageInputStream
        Throws:
        java.io.IOException
      • readLine

        public java.lang.String readLine()
                                  throws java.io.IOException
        Specified by:
        readLine in interface java.io.DataInput
        Specified by:
        readLine in interface javax.imageio.stream.ImageInputStream
        Throws:
        java.io.IOException
      • readUTF

        public java.lang.String readUTF()
                                 throws java.io.IOException
        Specified by:
        readUTF in interface java.io.DataInput
        Specified by:
        readUTF in interface javax.imageio.stream.ImageInputStream
        Throws:
        java.io.IOException
      • readFully

        public void readFully​(byte[] b,
                              int off,
                              int len)
                       throws java.io.IOException
        Specified by:
        readFully in interface java.io.DataInput
        Specified by:
        readFully in interface javax.imageio.stream.ImageInputStream
        Throws:
        java.io.IOException
      • readFully

        public void readFully​(byte[] b)
                       throws java.io.IOException
        Specified by:
        readFully in interface java.io.DataInput
        Specified by:
        readFully in interface javax.imageio.stream.ImageInputStream
        Throws:
        java.io.IOException
      • readFully

        public void readFully​(short[] s,
                              int off,
                              int len)
                       throws java.io.IOException
        Specified by:
        readFully in interface javax.imageio.stream.ImageInputStream
        Throws:
        java.io.IOException
      • readFully

        public void readFully​(char[] c,
                              int off,
                              int len)
                       throws java.io.IOException
        Specified by:
        readFully in interface javax.imageio.stream.ImageInputStream
        Throws:
        java.io.IOException
      • readFully

        public void readFully​(int[] i,
                              int off,
                              int len)
                       throws java.io.IOException
        Specified by:
        readFully in interface javax.imageio.stream.ImageInputStream
        Throws:
        java.io.IOException
      • readFully

        public void readFully​(long[] l,
                              int off,
                              int len)
                       throws java.io.IOException
        Specified by:
        readFully in interface javax.imageio.stream.ImageInputStream
        Throws:
        java.io.IOException
      • readFully

        public void readFully​(float[] f,
                              int off,
                              int len)
                       throws java.io.IOException
        Specified by:
        readFully in interface javax.imageio.stream.ImageInputStream
        Throws:
        java.io.IOException
      • readFully

        public void readFully​(double[] d,
                              int off,
                              int len)
                       throws java.io.IOException
        Specified by:
        readFully in interface javax.imageio.stream.ImageInputStream
        Throws:
        java.io.IOException
      • getStreamPosition

        public long getStreamPosition()
                               throws java.io.IOException
        Specified by:
        getStreamPosition in interface javax.imageio.stream.ImageInputStream
        Throws:
        java.io.IOException
      • getBitOffset

        public int getBitOffset()
                         throws java.io.IOException
        Specified by:
        getBitOffset in interface javax.imageio.stream.ImageInputStream
        Throws:
        java.io.IOException
      • setBitOffset

        public void setBitOffset​(int bitOffset)
                          throws java.io.IOException
        Specified by:
        setBitOffset in interface javax.imageio.stream.ImageInputStream
        Throws:
        java.io.IOException
      • readBit

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

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

        public long length()
                    throws java.io.IOException
        Specified by:
        length in interface javax.imageio.stream.ImageInputStream
        Throws:
        java.io.IOException
      • skipBytes

        public int skipBytes​(int n)
                      throws java.io.IOException
        Specified by:
        skipBytes in interface java.io.DataInput
        Specified by:
        skipBytes in interface javax.imageio.stream.ImageInputStream
        Throws:
        java.io.IOException
      • skipBytes

        public long skipBytes​(long n)
                       throws java.io.IOException
        Specified by:
        skipBytes in interface javax.imageio.stream.ImageInputStream
        Throws:
        java.io.IOException
      • seek

        public void seek​(long pos)
                  throws java.io.IOException
        Specified by:
        seek in interface javax.imageio.stream.ImageInputStream
        Throws:
        java.io.IOException
      • mark

        public void mark()
        Pushes the current stream position onto a stack of marked positions.
        Specified by:
        mark in interface javax.imageio.stream.ImageInputStream
      • reset

        public void reset()
                   throws java.io.IOException
        Resets the current stream byte and bit positions from the stack of marked positions.

        An IOException will be thrown if the previous marked position lies in the discarded portion of the stream.

        Specified by:
        reset in interface javax.imageio.stream.ImageInputStream
        Throws:
        java.io.IOException - if an I/O error occurs.
      • flushBefore

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

        public void flush()
                   throws java.io.IOException
        Specified by:
        flush in interface javax.imageio.stream.ImageInputStream
        Throws:
        java.io.IOException
      • getFlushedPosition

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

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

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

        public boolean isCachedFile()
        Specified by:
        isCachedFile in interface javax.imageio.stream.ImageInputStream