|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pivot.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 | |
---|---|
String |
getMIMEType(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. |
BufferedImage |
readObject(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(BufferedImage bufferedImage,
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 BufferedImage readObject(InputStream inputStream) throws IOException, SerializationException
readObject
in interface Serializer<BufferedImage>
inputStream
- The data stream from which the object will be read.
IOException
SerializationException
public void writeObject(BufferedImage bufferedImage, OutputStream outputStream) throws IOException, SerializationException
writeObject
in interface Serializer<BufferedImage>
bufferedImage
- The object to serialize.outputStream
- The data stream to which the object will be written.
IOException
SerializationException
public String getMIMEType(BufferedImage bufferedImage)
Serializer
getMIMEType
in interface Serializer<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 |