Package org.openscience.cdk.io.cml
Class CustomSerializer
- java.lang.Object
-
- nu.xom.Serializer
-
- org.openscience.cdk.io.cml.CustomSerializer
-
public class CustomSerializer extends nu.xom.Serializer
CustomSerializer
with the sole purpose and functionality to not output the XML declaration.- Author:
- egonw
- Source code:
- main
- Belongs to CDK module:
- libiocml
-
-
Constructor Summary
Constructors Constructor Description CustomSerializer(OutputStream out)
Instantiates a newCustomSerializer
using the matchingSerializer(OutputStream)
.CustomSerializer(OutputStream out, String encoding)
Instantiates a newCustomSerializer
using the matchingSerializer(OutputStream, String)
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
writeXMLDeclaration()
Overwrite theSerializer.writeXMLDeclaration()
method, and have it not output the XML declaration.-
Methods inherited from class nu.xom.Serializer
breakLine, flush, getColumnNumber, getEncoding, getIndent, getLineSeparator, getMaxLength, getPreserveBaseURI, getUnicodeNormalizationFormC, setIndent, setLineSeparator, setMaxLength, setOutputStream, setPreserveBaseURI, setUnicodeNormalizationFormC, write, write, write, write, write, write, write, writeAttributes, writeAttributeValue, writeChild, writeEmptyElementTag, writeEndTag, writeEscaped, writeNamespaceDeclaration, writeNamespaceDeclarations, writeRaw, writeStartTag
-
-
-
-
Constructor Detail
-
CustomSerializer
public CustomSerializer(OutputStream out)
Instantiates a newCustomSerializer
using the matchingSerializer(OutputStream)
.- Parameters:
out
- the output stream to write the document on
-
CustomSerializer
public CustomSerializer(OutputStream out, String encoding) throws UnsupportedEncodingException
Instantiates a newCustomSerializer
using the matchingSerializer(OutputStream, String)
.- Parameters:
out
- the output stream to write the document onencoding
- the character encoding for the serialization- Throws:
UnsupportedEncodingException
-
-
Method Detail
-
writeXMLDeclaration
protected void writeXMLDeclaration() throws IOException
Overwrite theSerializer.writeXMLDeclaration()
method, and have it not output the XML declaration.- Overrides:
writeXMLDeclaration
in classnu.xom.Serializer
- Throws:
IOException
-
-