Class ImageRawStream.SingleStreamFactory
- java.lang.Object
-
- org.apache.xmlgraphics.image.loader.impl.ImageRawStream.SingleStreamFactory
-
- All Implemented Interfaces:
ImageRawStream.InputStreamFactory
- Enclosing class:
- ImageRawStream
private static class ImageRawStream.SingleStreamFactory extends java.lang.Object implements ImageRawStream.InputStreamFactory
InputStream factory that can return a pre-constructed InputStream exactly once.
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.InputStreamin
-
Constructor Summary
Constructors Constructor Description SingleStreamFactory(java.io.InputStream in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes the factory and releases any resources held open during the lifetime of this object.java.io.InputStreamcreateInputStream()Creates and returns a new InputStream.protected voidfinalize()booleanisUsedOnceOnly()Indicates whether this factory is only usable once or many times.
-
-
-
Method Detail
-
createInputStream
public java.io.InputStream createInputStream()
Description copied from interface:ImageRawStream.InputStreamFactoryCreates and returns a new InputStream.- Specified by:
createInputStreamin interfaceImageRawStream.InputStreamFactory- Returns:
- the new InputStream
-
close
public void close()
Description copied from interface:ImageRawStream.InputStreamFactoryCloses the factory and releases any resources held open during the lifetime of this object.- Specified by:
closein interfaceImageRawStream.InputStreamFactory
-
isUsedOnceOnly
public boolean isUsedOnceOnly()
Description copied from interface:ImageRawStream.InputStreamFactoryIndicates whether this factory is only usable once or many times.- Specified by:
isUsedOnceOnlyin interfaceImageRawStream.InputStreamFactory- Returns:
- true if the factory can only be used once
-
finalize
protected void finalize()
- Overrides:
finalizein classjava.lang.Object
-
-