Class 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  
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SVGDiagramSerializer

        public SVGDiagramSerializer()
    • 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 interface Serializer<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 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 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 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.
        Returns:
        The MIME type of the current data.