|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpivot.wtk.media.BufferedImageSerializer
public class BufferedImageSerializer
Implementation of the Serializer
interface that reads and writes
instances of BufferedImage
.
Nested Class Summary | |
---|---|
static class |
BufferedImageSerializer.Format
Supported image formats. |
Constructor Summary | |
---|---|
BufferedImageSerializer()
|
|
BufferedImageSerializer(BufferedImageSerializer.Format outputFormat)
|
Method Summary | |
---|---|
java.lang.String |
getMIMEType(java.awt.image.BufferedImage bufferedImage)
Returns the MIME type of the data read and written by this serializer. |
BufferedImageSerializer.Format |
getOutputFormat()
Gets the image format that this serializer is using for output. |
java.awt.image.BufferedImage |
readObject(java.io.InputStream inputStream)
Reads a serialized image from an input stream. |
void |
setOutputFormat(BufferedImageSerializer.Format outputFormat)
Sets the image format that this serializer should use for output. |
void |
writeObject(java.awt.image.BufferedImage bufferedImage,
java.io.OutputStream outputStream)
Writes a buffered image to an output stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BufferedImageSerializer()
public BufferedImageSerializer(BufferedImageSerializer.Format outputFormat)
Method Detail |
---|
public BufferedImageSerializer.Format getOutputFormat()
public void setOutputFormat(BufferedImageSerializer.Format outputFormat)
public java.awt.image.BufferedImage readObject(java.io.InputStream inputStream) throws java.io.IOException, SerializationException
readObject
in interface Serializer<java.awt.image.BufferedImage>
inputStream
- The data stream from which the object will be read.
java.io.IOException
SerializationException
public void writeObject(java.awt.image.BufferedImage bufferedImage, java.io.OutputStream outputStream) throws java.io.IOException, SerializationException
writeObject
in interface Serializer<java.awt.image.BufferedImage>
bufferedImage
- The object to serialize.outputStream
- The data stream to which the object will be written.
java.io.IOException
SerializationException
public java.lang.String getMIMEType(java.awt.image.BufferedImage bufferedImage)
Serializer
getMIMEType
in interface Serializer<java.awt.image.BufferedImage>
bufferedImage
- If provided, allows the serializer to attach parameters to the returned
MIME type containing more detailed information about the data. If
null, the base MIME type is returned.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |