Class SerializerImpl
java.lang.Object
org.eclipse.birt.chart.model.impl.SerializerImpl
- All Implemented Interfaces:
Serializer
SerializerImpl
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionWrite the chart described by the model to a ByteArrayOutputStream.fromXml
(ByteArrayInputStream byais, boolean bStripHeaders) Reads the chart model from the ByteArrayInputStream.static final Serializer
instance()
Loads the chart preferences from the InputStream.read
(InputStream is) Reads the chart model from the given InputStreamread
(org.eclipse.emf.common.util.URI uri) Reads the chart model from the location defined by the URI provided.readEmbedded
(org.eclipse.emf.common.util.URI uri) Reads the chart model embedded inside other XML content defined by the URI provided.void
savePreferences
(ChartPreferences preferences, OutputStream os) Saves the chart preferences to the specified OutputStream.void
write
(Chart cModel, OutputStream os) Write the chart described by the model to the OutputStream provided.void
Write the chart described by the model to the location defined by the URI provided.
-
Field Details
-
CHART_START_MARKER
- See Also:
-
CHART_END_MARKER
- See Also:
-
-
Method Details
-
instance
- Returns:
- A singleton instance of the chart serializer
-
write
Description copied from interface:Serializer
Write the chart described by the model to the OutputStream provided.- Specified by:
write
in interfaceSerializer
- Parameters:
cModel
- The model to be serialized os The OutputStream to which the model is to be serialized- Throws:
IOException
-
write
Description copied from interface:Serializer
Write the chart described by the model to the location defined by the URI provided.- Specified by:
write
in interfaceSerializer
- Parameters:
cModel
- The model to be serialized uri The URI to which the model is to be serialized- Throws:
IOException
-
asXml
Description copied from interface:Serializer
Write the chart described by the model to a ByteArrayOutputStream.- Specified by:
asXml
in interfaceSerializer
- Parameters:
cModel
- The model to be serialized bStripHeaders Specifies whether or not the headers are to be removed while serializing the model- Returns:
- the ByteArrayOutputStream containing the serialized model
- Throws:
IOException
-
savePreferences
Description copied from interface:Serializer
Saves the chart preferences to the specified OutputStream.- Specified by:
savePreferences
in interfaceSerializer
- Parameters:
preferences
- The ChartPreferences object to be savedos
- The OutputStream to which the preferences are to be written- Throws:
IOException
-
read
Description copied from interface:Serializer
Reads the chart model from the given InputStream- Specified by:
read
in interfaceSerializer
- Returns:
- chart model read from the stream
- Throws:
IOException
-
read
Description copied from interface:Serializer
Reads the chart model from the location defined by the URI provided.- Specified by:
read
in interfaceSerializer
- Parameters:
uri
- URI of the location holding the chart model- Returns:
- chart model read from the source
- Throws:
IOException
-
readEmbedded
Description copied from interface:Serializer
Reads the chart model embedded inside other XML content defined by the URI provided.- Specified by:
readEmbedded
in interfaceSerializer
- Parameters:
uri
- URI of the location holding the embedded chart model- Returns:
- chart model read from the source
- Throws:
IOException
-
fromXml
Description copied from interface:Serializer
Reads the chart model from the ByteArrayInputStream.- Specified by:
fromXml
in interfaceSerializer
- Parameters:
byais
- The ByteArrayInputStream holding the chart modelbStripHeaders
- Specifies whether or not the headers were removed when the chart model was saved- Returns:
- chart model read from the stream
- Throws:
IOException
-
loadPreferences
Description copied from interface:Serializer
Loads the chart preferences from the InputStream.- Specified by:
loadPreferences
in interfaceSerializer
- Parameters:
is
- InputStream from which the chart preferences are to be read- Returns:
- ChartPreferences instance read from the stream
- Throws:
IOException
-