Package com.twelvemonkeys.imageio.stream
Class SubImageOutputStream
- java.lang.Object
-
- javax.imageio.stream.ImageInputStreamImpl
-
- javax.imageio.stream.ImageOutputStreamImpl
-
- com.twelvemonkeys.imageio.stream.SubImageOutputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.DataInput
,java.io.DataOutput
,java.lang.AutoCloseable
,javax.imageio.stream.ImageInputStream
,javax.imageio.stream.ImageOutputStream
public class SubImageOutputStream extends javax.imageio.stream.ImageOutputStreamImpl
ImageInputStream that writes through a delegate, but keeps local position and bit offset. Note: Flushing or closing this stream will *not* have an effect on the delegate.- Version:
- $Id: SubImageOutputStream.java,v 1.0 30/03/15 harald.kuhr Exp$
- Author:
- Harald Kuhr, last modified by $Author: harald.kuhr$
-
-
Constructor Summary
Constructors Constructor Description SubImageOutputStream(javax.imageio.stream.ImageOutputStream stream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isCached()
boolean
isCachedFile()
boolean
isCachedMemory()
int
read()
int
read(byte[] b, int off, int len)
void
seek(long pos)
void
write(byte[] b, int off, int len)
void
write(int b)
-
Methods inherited from class javax.imageio.stream.ImageOutputStreamImpl
flushBits, write, writeBit, writeBits, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeChars, writeDouble, writeDoubles, writeFloat, writeFloats, writeInt, writeInts, writeLong, writeLongs, writeShort, writeShorts, writeUTF
-
Methods inherited from class javax.imageio.stream.ImageInputStreamImpl
checkClosed, close, finalize, flush, flushBefore, getBitOffset, getByteOrder, getFlushedPosition, getStreamPosition, 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, setBitOffset, setByteOrder, 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
close, flush, getBitOffset, getByteOrder, getFlushedPosition, getStreamPosition, 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, setBitOffset, setByteOrder, skipBytes, skipBytes
-
-
-
-
Method Detail
-
seek
public void seek(long pos) throws java.io.IOException
- Specified by:
seek
in interfacejavax.imageio.stream.ImageInputStream
- Overrides:
seek
in classjavax.imageio.stream.ImageInputStreamImpl
- Throws:
java.io.IOException
-
write
public void write(int b) throws java.io.IOException
- Specified by:
write
in interfacejava.io.DataOutput
- Specified by:
write
in interfacejavax.imageio.stream.ImageOutputStream
- Specified by:
write
in classjavax.imageio.stream.ImageOutputStreamImpl
- Throws:
java.io.IOException
-
write
public void write(byte[] b, int off, int len) throws java.io.IOException
- Specified by:
write
in interfacejava.io.DataOutput
- Specified by:
write
in interfacejavax.imageio.stream.ImageOutputStream
- Specified by:
write
in classjavax.imageio.stream.ImageOutputStreamImpl
- Throws:
java.io.IOException
-
read
public int read() throws java.io.IOException
- Specified by:
read
in interfacejavax.imageio.stream.ImageInputStream
- Specified by:
read
in classjavax.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 interfacejavax.imageio.stream.ImageInputStream
- Specified by:
read
in classjavax.imageio.stream.ImageInputStreamImpl
- Throws:
java.io.IOException
-
isCached
public boolean isCached()
- Specified by:
isCached
in interfacejavax.imageio.stream.ImageInputStream
- Overrides:
isCached
in classjavax.imageio.stream.ImageInputStreamImpl
-
isCachedMemory
public boolean isCachedMemory()
- Specified by:
isCachedMemory
in interfacejavax.imageio.stream.ImageInputStream
- Overrides:
isCachedMemory
in classjavax.imageio.stream.ImageInputStreamImpl
-
isCachedFile
public boolean isCachedFile()
- Specified by:
isCachedFile
in interfacejavax.imageio.stream.ImageInputStream
- Overrides:
isCachedFile
in classjavax.imageio.stream.ImageInputStreamImpl
-
-