- java.lang.Object
-
- javax.imageio.stream.ImageInputStreamImpl
-
- javax.imageio.stream.ImageOutputStreamImpl
-
- javax.imageio.stream.MemoryCacheImageOutputStream
-
- 实现的所有接口
-
Closeable,DataInput,DataOutput,AutoCloseable,ImageInputStream,ImageOutputStream
public class MemoryCacheImageOutputStream extends ImageOutputStreamImpl
ImageOutputStream的实现,将其输出写入常规OutputStream。 存储缓冲器用于至少缓存丢弃位置和当前写位置之间的数据。 唯一的构造函数采用OutputStream,因此该类不能用于读取/修改/写入操作。 只能在已经写入缓存且尚未刷新的流的部分上进行读取。
-
-
字段汇总
-
声明的属性在类 javax.imageio.stream.ImageInputStreamImpl
bitOffset, byteOrder, flushedPos, streamPos
-
-
构造方法摘要
构造方法 构造器 描述 MemoryCacheImageOutputStream(OutputStream stream)构造一个MemoryCacheImageOutputStream,写入给定的OutputStream。
-
方法摘要
所有方法 实例方法 具体的方法 变量和类型 方法 描述 voidclose()关闭这个MemoryCacheImageOutputStream。booleanisCached()返回true因为此ImageOutputStream缓存数据以便允许向后搜索。booleanisCachedFile()返回false因为此ImageOutputStream未维护文件缓存。booleanisCachedMemory()返回true因为此ImageOutputStream维护主内存高速缓存。-
声明方法的类 javax.imageio.stream.ImageOutputStreamImpl
flushBits
-
声明方法的类 javax.imageio.stream.ImageInputStreamImpl
checkClosed, finalize, length, mark, read, read, read, reset, skipBytes, skipBytes
-
声明方法的类 java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
声明方法的接口 javax.imageio.stream.ImageInputStream
flush, getBitOffset, getByteOrder, getFlushedPosition, getStreamPosition, length, mark, read, read, 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
-
声明方法的接口 javax.imageio.stream.ImageOutputStream
flushBefore, write, write, write, writeBit, writeBits, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeChars, writeDouble, writeDoubles, writeFloat, writeFloats, writeInt, writeInts, writeLong, writeLongs, writeShort, writeShorts, writeUTF
-
-
-
-
构造方法详细信息
-
MemoryCacheImageOutputStream
public MemoryCacheImageOutputStream(OutputStream stream)
构造一个MemoryCacheImageOutputStream,它将写入给定的OutputStream。- 参数
-
stream- 写一个OutputStream。 - 异常
-
IllegalArgumentException- 如果stream是null。
-
-
方法详细信息
-
isCached
public boolean isCached()
返回true因为此ImageOutputStream缓存数据以便允许向后搜索。- Specified by:
-
isCached在界面ImageInputStream - 重写:
-
isCached在类ImageInputStreamImpl - 结果
-
true。 - 另请参见:
-
isCachedMemory(),isCachedFile()
-
isCachedFile
public boolean isCachedFile()
返回false因为此ImageOutputStream不维护文件缓存。- Specified by:
-
isCachedFile在界面ImageInputStream - 重写:
-
isCachedFile在类ImageInputStreamImpl - 结果
-
false。 - 另请参见:
-
isCached(),isCachedMemory()
-
isCachedMemory
public boolean isCachedMemory()
返回true因为此ImageOutputStream维护主内存缓存。- Specified by:
-
isCachedMemory在界面ImageInputStream - 重写:
-
isCachedMemory在类ImageInputStreamImpl - 结果
-
true。 - 另请参见:
-
isCached(),isCachedFile()
-
close
public void close() throws IOException关闭这个MemoryCacheImageOutputStream。 将所有挂起的数据刷新到输出,并释放缓存。 目的地OutputStream尚未关闭。- 异常
-
IOException- 如果发生I / O错误。
-
-