Package org.apache.pivot.wtk.media
Class SVGDiagramSerializer
- java.lang.Object
-
- org.apache.pivot.wtk.media.SVGDiagramSerializer
-
- All Implemented Interfaces:
Serializer<com.kitfox.svg.SVGDiagram>
public class SVGDiagramSerializer extends java.lang.Object implements Serializer<com.kitfox.svg.SVGDiagram>
SVG diagram serializer.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
MIME_TYPE
static java.lang.String
SVG_EXTENSION
-
Constructor Summary
Constructors Constructor Description SVGDiagramSerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getMIMEType(com.kitfox.svg.SVGDiagram diagram)
Returns the MIME type of the data read and written by this serializer.com.kitfox.svg.SVGDiagram
readObject(java.io.InputStream inputStream)
Reads an object from an input stream.void
writeObject(com.kitfox.svg.SVGDiagram diagram, java.io.OutputStream outputStream)
Writes an object to an output stream.
-
-
-
Field Detail
-
MIME_TYPE
public static final java.lang.String MIME_TYPE
- See Also:
- Constant Field Values
-
SVG_EXTENSION
public static final java.lang.String SVG_EXTENSION
- See Also:
- Constant Field Values
-
-
Method Detail
-
readObject
public com.kitfox.svg.SVGDiagram readObject(java.io.InputStream inputStream) throws java.io.IOException
Description copied from interface:Serializer
Reads an object from an input stream.- Specified by:
readObject
in interfaceSerializer<com.kitfox.svg.SVGDiagram>
- Parameters:
inputStream
- The data stream from which the object will be read.- Returns:
- The deserialized object.
- Throws:
java.io.IOException
- for any errors accessing or reading the object.
-
writeObject
@UnsupportedOperation public void writeObject(com.kitfox.svg.SVGDiagram diagram, java.io.OutputStream outputStream)
Description copied from interface:Serializer
Writes an object to an output stream.- Specified by:
writeObject
in interfaceSerializer<com.kitfox.svg.SVGDiagram>
- Parameters:
diagram
- The object to serialize.outputStream
- The data stream to which the object will be written.
-
getMIMEType
public java.lang.String getMIMEType(com.kitfox.svg.SVGDiagram diagram)
Description copied from interface:Serializer
Returns the MIME type of the data read and written by this serializer.- Specified by:
getMIMEType
in interfaceSerializer<com.kitfox.svg.SVGDiagram>
- Parameters:
diagram
- If provided, allows the serializer to attach parameters to the returned MIME type containing more detailed information about the data. Ifnull
, the base MIME type is returned.- Returns:
- The MIME type of the current data.
-
-