|
xmlgraphics-commons 2.0.1 | |||||||||
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 class |
ImageRawStream.ByteArrayStreamFactory
InputStream factory that wraps a byte array. |
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,
InputStream in)
Constructor for a simple InputStream as parameter. |
Method Summary | |
---|---|
InputStream |
createInputStream()
Returns a new InputStream to access the raw image. |
ImageFlavor |
getFlavor()
Returns the flavor of the image. |
String |
getMimeType()
Returns the MIME type of the stream data. |
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(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, 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 String getMimeType()
public boolean isCacheable()
public void setInputStreamFactory(ImageRawStream.InputStreamFactory factory)
factory
- the new InputStreamFactorypublic InputStream createInputStream()
public void writeTo(OutputStream out) throws IOException
out
- the OutputStream
IOException
- if an I/O error occurs
|
xmlgraphics-commons 2.0.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |