|
xmlgraphics-commons 1.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.xmlgraphics.image.loader.impl.AbstractImage
org.apache.xmlgraphics.image.loader.impl.ImageRawStream
public class ImageRawStream
This class is an implementation of the Image interface exposing an InputStream for loading the raw/undecoded image.
Nested Class Summary | |
---|---|
static interface |
ImageRawStream.InputStreamFactory
Represents a factory for InputStream objects. |
Constructor Summary | |
---|---|
ImageRawStream(ImageInfo info,
ImageFlavor flavor,
ImageRawStream.InputStreamFactory streamFactory)
Main constructor. |
|
ImageRawStream(ImageInfo info,
ImageFlavor flavor,
java.io.InputStream in)
Constructor for a simple InputStream as parameter. |
Method Summary | |
---|---|
java.io.InputStream |
createInputStream()
Returns a new InputStream to access the raw image. |
ImageFlavor |
getFlavor()
Returns the flavor of the image. |
boolean |
isCacheable()
Indicates whether the Image instance is cacheable in memory. |
void |
setInputStreamFactory(ImageRawStream.InputStreamFactory factory)
Sets the InputStreamFactory to be used by this image. |
void |
writeTo(java.io.File target)
Writes the content of the image to a File. |
void |
writeTo(java.io.OutputStream out)
Writes the content of the image to an OutputStream. |
Methods inherited from class org.apache.xmlgraphics.image.loader.impl.AbstractImage |
---|
getColorSpace, getICCProfile, getInfo, getSize, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ImageRawStream(ImageInfo info, ImageFlavor flavor, ImageRawStream.InputStreamFactory streamFactory)
info
- the image info objectflavor
- the image flavor for the raw imagestreamFactory
- the InputStreamFactory that is used to create InputStream instancespublic ImageRawStream(ImageInfo info, ImageFlavor flavor, java.io.InputStream in)
info
- the image info objectflavor
- the image flavor for the raw imagein
- the InputStream with the raw contentMethod Detail |
---|
public ImageFlavor getFlavor()
public boolean isCacheable()
public void setInputStreamFactory(ImageRawStream.InputStreamFactory factory)
factory
- the new InputStreamFactorypublic java.io.InputStream createInputStream()
public void writeTo(java.io.OutputStream out) throws java.io.IOException
out
- the OutputStream
java.io.IOException
- if an I/O error occurspublic void writeTo(java.io.File target) throws java.io.IOException
target
- the file to be written
java.io.IOException
- if an I/O error occurs
|
xmlgraphics-commons 1.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |