Package org.aoju.bus.image.nimble.stream
Class SegmentedImageStream
java.lang.Object
javax.imageio.stream.ImageInputStreamImpl
org.aoju.bus.image.nimble.stream.SegmentedImageStream
- All Implemented Interfaces:
Closeable,DataInput,AutoCloseable,ImageInputStream
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Field Summary
Fields inherited from class javax.imageio.stream.ImageInputStreamImpl
bitOffset, byteOrder, flushedPos, streamPos -
Constructor Summary
ConstructorsConstructorDescriptionSegmentedImageStream(byte[] data) SegmentedImageStream(ImageInputStream iis, long streamPosition, int length, boolean singleFrame) SegmentedImageStream(ImageInputStream stream, Fragments pixeldataFragments, int frameIndex) -
Method Summary
Modifier and TypeMethodDescriptionlonglonglonglength()intread()intread(byte[] b, int off, int len) voidseek(long pos) voidsetImageDescriptor(ImageDescriptor imageDescriptor) longtransferTo(OutputStream out) Reads all bytes from this input stream and writes the bytes to the given output stream.Methods inherited from class javax.imageio.stream.ImageInputStreamImpl
checkClosed, close, finalize, flush, flushBefore, getBitOffset, getByteOrder, getFlushedPosition, getStreamPosition, isCached, isCachedFile, isCachedMemory, 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, setBitOffset, setByteOrder, skipBytes, skipBytes
-
Constructor Details
-
SegmentedImageStream
public SegmentedImageStream(ImageInputStream stream, Fragments pixeldataFragments, int frameIndex) throws IOException - Throws:
IOException
-
SegmentedImageStream
public SegmentedImageStream(ImageInputStream iis, long streamPosition, int length, boolean singleFrame) throws IOException - Throws:
IOException
-
SegmentedImageStream
- Throws:
IOException
-
-
Method Details
-
getImageDescriptor
-
setImageDescriptor
-
seek
- Specified by:
seekin interfaceImageInputStream- Overrides:
seekin classImageInputStreamImpl- Throws:
IOException
-
read
- Specified by:
readin interfaceImageInputStream- Specified by:
readin classImageInputStreamImpl- Throws:
IOException
-
read
- Specified by:
readin interfaceImageInputStream- Specified by:
readin classImageInputStreamImpl- Throws:
IOException
-
getLastSegmentEnd
public long getLastSegmentEnd() -
getOffsetPostPixelData
- Throws:
IOException
-
transferTo
Reads all bytes from this input stream and writes the bytes to the given output stream. This method does not close either stream.- Parameters:
out- the output stream, non-null- Returns:
- the number of bytes transferred
- Throws:
IOException- if an I/O error occurs when reading or writing
-
length
public long length()- Specified by:
lengthin interfaceImageInputStream- Overrides:
lengthin classImageInputStreamImpl
-