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.InputStream
in
-
Constructor Summary
Constructors Constructor Description SingleStreamFactory(java.io.InputStream in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes the factory and releases any resources held open during the lifetime of this object.java.io.InputStream
createInputStream()
Creates and returns a new InputStream.protected void
finalize()
boolean
isUsedOnceOnly()
Indicates whether this factory is only usable once or many times.
-
-
-
Method Detail
-
createInputStream
public java.io.InputStream createInputStream()
Description copied from interface:ImageRawStream.InputStreamFactory
Creates and returns a new InputStream.- Specified by:
createInputStream
in interfaceImageRawStream.InputStreamFactory
- Returns:
- the new InputStream
-
close
public void close()
Description copied from interface:ImageRawStream.InputStreamFactory
Closes the factory and releases any resources held open during the lifetime of this object.- Specified by:
close
in interfaceImageRawStream.InputStreamFactory
-
isUsedOnceOnly
public boolean isUsedOnceOnly()
Description copied from interface:ImageRawStream.InputStreamFactory
Indicates whether this factory is only usable once or many times.- Specified by:
isUsedOnceOnly
in interfaceImageRawStream.InputStreamFactory
- Returns:
- true if the factory can only be used once
-
finalize
protected void finalize()
- Overrides:
finalize
in classjava.lang.Object
-
-