Module net.anwiba.commons.image
Package net.anwiba.commons.image.imageio
Class SeekableImageInputStream
java.lang.Object
net.anwiba.commons.image.imageio.SeekableImageInputStream
- All Implemented Interfaces:
Closeable,DataInput,AutoCloseable,ImageInputStream
-
Constructor Summary
ConstructorsConstructorDescriptionSeekableImageInputStream(org.eclipse.imagen.media.codec.SeekableStream seekableStream) -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidvoidclose()voidflush()voidflushBefore(long pos) intlonglongbooleanisCached()booleanbooleanlonglength()voidmark()Pushes the current stream position onto a stack of marked positions.intread()intread(byte[] b) intread(byte[] b, int off, int len) intreadBit()longreadBits(int numBits) booleanbytereadByte()voidreadBytes(IIOByteBuffer buf, int len) charreadChar()doublefloatvoidreadFully(byte[] b) voidreadFully(byte[] b, int off, int len) voidreadFully(char[] c, int off, int len) voidreadFully(double[] d, int off, int len) voidreadFully(float[] f, int off, int len) voidreadFully(int[] i, int off, int len) voidreadFully(long[] l, int off, int len) voidreadFully(short[] s, int off, int len) intreadInt()readLine()longreadLong()shortintlongintreadUTF()voidreset()Resets the current stream byte and bit positions from the stack of marked positions.voidseek(long pos) voidsetBitOffset(int bitOffset) voidsetByteOrder(ByteOrder byteOrder) intskipBytes(int n) longskipBytes(long n)
-
Constructor Details
-
SeekableImageInputStream
public SeekableImageInputStream(org.eclipse.imagen.media.codec.SeekableStream seekableStream)
-
-
Method Details
-
checkClosed
- Throws:
IOException
-
read
- Specified by:
readin interfaceImageInputStream- Throws:
IOException
-
read
- Specified by:
readin interfaceImageInputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceImageInputStream- Throws:
IOException
-
setByteOrder
- Specified by:
setByteOrderin interfaceImageInputStream
-
getByteOrder
- Specified by:
getByteOrderin interfaceImageInputStream
-
read
- Specified by:
readin interfaceImageInputStream- Throws:
IOException
-
readBytes
- Specified by:
readBytesin interfaceImageInputStream- Throws:
IOException
-
readBoolean
- Specified by:
readBooleanin interfaceDataInput- Specified by:
readBooleanin interfaceImageInputStream- Throws:
IOException
-
readByte
- Specified by:
readBytein interfaceDataInput- Specified by:
readBytein interfaceImageInputStream- Throws:
IOException
-
readUnsignedByte
- Specified by:
readUnsignedBytein interfaceDataInput- Specified by:
readUnsignedBytein interfaceImageInputStream- Throws:
IOException
-
readShort
- Specified by:
readShortin interfaceDataInput- Specified by:
readShortin interfaceImageInputStream- Throws:
IOException
-
readUnsignedShort
- Specified by:
readUnsignedShortin interfaceDataInput- Specified by:
readUnsignedShortin interfaceImageInputStream- Throws:
IOException
-
readChar
- Specified by:
readCharin interfaceDataInput- Specified by:
readCharin interfaceImageInputStream- Throws:
IOException
-
readInt
- Specified by:
readIntin interfaceDataInput- Specified by:
readIntin interfaceImageInputStream- Throws:
IOException
-
readUnsignedInt
- Specified by:
readUnsignedIntin interfaceImageInputStream- Throws:
IOException
-
readLong
- Specified by:
readLongin interfaceDataInput- Specified by:
readLongin interfaceImageInputStream- Throws:
IOException
-
readFloat
- Specified by:
readFloatin interfaceDataInput- Specified by:
readFloatin interfaceImageInputStream- Throws:
IOException
-
readDouble
- Specified by:
readDoublein interfaceDataInput- Specified by:
readDoublein interfaceImageInputStream- Throws:
IOException
-
readLine
- Specified by:
readLinein interfaceDataInput- Specified by:
readLinein interfaceImageInputStream- Throws:
IOException
-
readUTF
- Specified by:
readUTFin interfaceDataInput- Specified by:
readUTFin interfaceImageInputStream- Throws:
IOException
-
readFully
- Specified by:
readFullyin interfaceDataInput- Specified by:
readFullyin interfaceImageInputStream- Throws:
IOException
-
readFully
- Specified by:
readFullyin interfaceDataInput- Specified by:
readFullyin interfaceImageInputStream- Throws:
IOException
-
readFully
- Specified by:
readFullyin interfaceImageInputStream- Throws:
IOException
-
readFully
- Specified by:
readFullyin interfaceImageInputStream- Throws:
IOException
-
readFully
- Specified by:
readFullyin interfaceImageInputStream- Throws:
IOException
-
readFully
- Specified by:
readFullyin interfaceImageInputStream- Throws:
IOException
-
readFully
- Specified by:
readFullyin interfaceImageInputStream- Throws:
IOException
-
readFully
- Specified by:
readFullyin interfaceImageInputStream- Throws:
IOException
-
getStreamPosition
- Specified by:
getStreamPositionin interfaceImageInputStream- Throws:
IOException
-
getBitOffset
- Specified by:
getBitOffsetin interfaceImageInputStream- Throws:
IOException
-
setBitOffset
- Specified by:
setBitOffsetin interfaceImageInputStream- Throws:
IOException
-
readBit
- Specified by:
readBitin interfaceImageInputStream- Throws:
IOException
-
readBits
- Specified by:
readBitsin interfaceImageInputStream- Throws:
IOException
-
length
- Specified by:
lengthin interfaceImageInputStream- Throws:
IOException
-
skipBytes
- Specified by:
skipBytesin interfaceDataInput- Specified by:
skipBytesin interfaceImageInputStream- Throws:
IOException
-
skipBytes
- Specified by:
skipBytesin interfaceImageInputStream- Throws:
IOException
-
seek
- Specified by:
seekin interfaceImageInputStream- Throws:
IOException
-
mark
public void mark()Pushes the current stream position onto a stack of marked positions.- Specified by:
markin interfaceImageInputStream
-
reset
Resets the current stream byte and bit positions from the stack of marked positions.An
IOExceptionwill be thrown if the previous marked position lies in the discarded portion of the stream.- Specified by:
resetin interfaceImageInputStream- Throws:
IOException- if an I/O error occurs.
-
flushBefore
- Specified by:
flushBeforein interfaceImageInputStream- Throws:
IOException
-
flush
- Specified by:
flushin interfaceImageInputStream- Throws:
IOException
-
getFlushedPosition
public long getFlushedPosition()- Specified by:
getFlushedPositionin interfaceImageInputStream
-
isCached
public boolean isCached()- Specified by:
isCachedin interfaceImageInputStream
-
isCachedMemory
public boolean isCachedMemory()- Specified by:
isCachedMemoryin interfaceImageInputStream
-
isCachedFile
public boolean isCachedFile()- Specified by:
isCachedFilein interfaceImageInputStream
-