Class MemBufferImageInputStream

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

    public class MemBufferImageInputStream
    extends javax.imageio.stream.ImageInputStreamImpl
    ImageInputStream for reading images that wraps a MemBuffer to get the bytes. Adds a method to find out how many bytes were read by the imageReader to read the image.
    • Field Summary

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

        bitOffset, byteOrder, flushedPos, streamPos
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getConsumedLength()  
      int read()  
      int read​(byte[] b, int off, int len)  
      • Methods inherited from class javax.imageio.stream.ImageInputStreamImpl

        checkClosed, close, finalize, flush, flushBefore, getBitOffset, getByteOrder, getFlushedPosition, getStreamPosition, isCached, isCachedFile, isCachedMemory, length, mark, read, readBit, readBits, readBoolean, readByte, readBytes, readChar, readDouble, readFloat, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedInt, readUnsignedShort, readUTF, reset, seek, setBitOffset, setByteOrder, skipBytes, skipBytes
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MemBufferImageInputStream

        public MemBufferImageInputStream​(MemBuffer buf,
                                         java.nio.ByteOrder byteOrder)
    • Method Detail

      • getConsumedLength

        public int getConsumedLength()
      • read

        public int read()
                 throws java.io.IOException
        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[] b,
                        int off,
                        int len)
                 throws java.io.IOException
        Specified by:
        read in interface javax.imageio.stream.ImageInputStream
        Specified by:
        read in class javax.imageio.stream.ImageInputStreamImpl
        Throws:
        java.io.IOException