|
xmlgraphics-commons 2.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 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,
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. |
java.lang.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(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 instances
public 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 content| Method Detail |
|---|
public ImageFlavor getFlavor()
public java.lang.String getMimeType()
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 occurs
|
xmlgraphics-commons 2.3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||