org.apache.pivot.wtk.media
Class SVGDiagramSerializer

java.lang.Object
  extended by org.apache.pivot.wtk.media.SVGDiagramSerializer
All Implemented Interfaces:
Serializer<com.kitfox.svg.SVGDiagram>

public class SVGDiagramSerializer
extends Object
implements Serializer<com.kitfox.svg.SVGDiagram>

SVG diagram serializer.


Field Summary
static String MIME_TYPE
           
static String SVG_EXTENSION
           
 
Constructor Summary
SVGDiagramSerializer()
           
 
Method Summary
 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(InputStream inputStream)
          Reads an object from an input stream.
 void writeObject(com.kitfox.svg.SVGDiagram diagram, OutputStream outputStream)
          Writes an object to an output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MIME_TYPE

public static final String MIME_TYPE
See Also:
Constant Field Values

SVG_EXTENSION

public static final String SVG_EXTENSION
See Also:
Constant Field Values
Constructor Detail

SVGDiagramSerializer

public SVGDiagramSerializer()
Method Detail

readObject

public com.kitfox.svg.SVGDiagram readObject(InputStream inputStream)
                                     throws IOException
Description copied from interface: Serializer
Reads an object from an input stream.

Specified by:
readObject in interface Serializer<com.kitfox.svg.SVGDiagram>
Parameters:
inputStream - The data stream from which the object will be read.
Returns:
The deserialized object.
Throws:
IOException

writeObject

public void writeObject(com.kitfox.svg.SVGDiagram diagram,
                        OutputStream outputStream)
Description copied from interface: Serializer
Writes an object to an output stream.

Specified by:
writeObject in interface Serializer<com.kitfox.svg.SVGDiagram>
Parameters:
diagram - The object to serialize.
outputStream - The data stream to which the object will be written.

getMIMEType

public 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 interface Serializer<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. If null, the base MIME type is returned.