ImageImageRawCCITTFax, ImageRawEPS, ImageRawJPEG, ImageRawPNGpublic class ImageRawStream extends AbstractImage
| Modifier and Type | Class | Description |
|---|---|---|
static class |
ImageRawStream.ByteArrayStreamFactory |
InputStream factory that wraps a byte array.
|
static interface |
ImageRawStream.InputStreamFactory |
Represents a factory for InputStream objects.
|
| Constructor | Description |
|---|---|
ImageRawStream(ImageInfo info,
ImageFlavor flavor,
InputStream in) |
Constructor for a simple InputStream as parameter.
|
ImageRawStream(ImageInfo info,
ImageFlavor flavor,
ImageRawStream.InputStreamFactory streamFactory) |
Main constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
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.
|
getColorSpace, getICCProfile, getInfo, getSize, toStringpublic 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 contentpublic 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 OutputStreamIOException - if an I/O error occursCopyright © 2018 Apache Software Foundation. All rights reserved.