|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object magoffin.matt.meta.support.BasicMetadataImage
public class BasicMetadataImage
Basic implementation of MetadataImage
.
Constructor Summary | |
---|---|
BasicMetadataImage(java.awt.image.BufferedImage image)
Construct from an BufferedImage . |
|
BasicMetadataImage(java.awt.Image image)
Construct from an Image . |
|
BasicMetadataImage(java.lang.String mimeType,
byte[] imageData)
Construct from a MIME type and byte array of image data. |
Method Summary | |
---|---|
java.awt.image.BufferedImage |
getAsBufferedImage()
Get the image as a BufferedImage . |
protected javax.imageio.ImageReader |
getImageReader()
Get an ImageReader for the given InputStream for the given MIME type. |
java.lang.String |
getMimeType()
Get the image MIME type. |
java.lang.String |
toString()
|
void |
writeToStream(java.io.OutputStream out)
Write the image data to an output stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BasicMetadataImage(java.lang.String mimeType, byte[] imageData)
mimeType
- the MIME typeimageData
- the image datapublic BasicMetadataImage(java.awt.Image image)
Image
.
image
- the imagepublic BasicMetadataImage(java.awt.image.BufferedImage image)
BufferedImage
.
image
- the imageMethod Detail |
---|
public java.awt.image.BufferedImage getAsBufferedImage()
MetadataImage
BufferedImage
.
Implementations are not required to support this method,
and if not supported should throw a
UnsupportedOperationException
.
getAsBufferedImage
in interface MetadataImage
protected javax.imageio.ImageReader getImageReader()
This method will create an ImageInputStream from the imageData
byte array in this instance.
public java.lang.String getMimeType()
MetadataImage
getMimeType
in interface MetadataImage
public void writeToStream(java.io.OutputStream out) throws java.io.IOException
MetadataImage
This method will not flush or close the output stream.
writeToStream
in interface MetadataImage
out
- the output stream
java.io.IOException
- if an IO error occurspublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |