@Immutable public final class MicroWriter extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
getNodeAsString(IMicroNode aNode,
IXMLWriterSettings aSettings) |
static String |
getXMLString(IMicroNode aNode)
Convert the passed micro node to an XML string using
XMLWriterSettings.DEFAULT_XML_SETTINGS. |
static ESuccess |
writeToFile(IMicroNode aNode,
File aFile)
Write a Micro Node to a file using the default settings.
|
static ESuccess |
writeToFile(IMicroNode aNode,
File aFile,
IXMLWriterSettings aSettings)
Write a Micro Node to a file.
|
static ESuccess |
writeToStream(IMicroNode aNode,
OutputStream aOS)
Write a Micro Node to an output stream using the default settings.
|
static ESuccess |
writeToStream(IMicroNode aNode,
OutputStream aOS,
IXMLWriterSettings aSettings)
Write a Micro Node to an
OutputStream. |
static ESuccess |
writeToWriter(IMicroNode aNode,
Writer aWriter,
IXMLWriterSettings aSettings)
Write a Micro Node to a
Writer. |
@Nonnull public static ESuccess writeToFile(@Nonnull IMicroNode aNode, @Nonnull File aFile)
aNode - The node to be serialized. May be any kind of node (incl.
documents). May not be null.aFile - The file to write to. May not be null.ESuccess@Nonnull public static ESuccess writeToFile(@Nonnull IMicroNode aNode, @Nonnull File aFile, @Nonnull IXMLWriterSettings aSettings)
aNode - The node to be serialized. May be any kind of node (incl.
documents). May not be null.aFile - The file to write to. May not be null.aSettings - The settings to be used for the creation. May not be
null.ESuccess@Nonnull public static ESuccess writeToStream(@Nonnull IMicroNode aNode, @Nonnull @WillClose OutputStream aOS)
aNode - The node to be serialized. May be any kind of node (incl.
documents). May not be null.aOS - The output stream to write to. May not be null. The
output stream is closed anyway directly after the operation finishes
(on success and on error).ESuccess@Nonnull public static ESuccess writeToStream(@Nonnull IMicroNode aNode, @Nonnull @WillClose OutputStream aOS, @Nonnull IXMLWriterSettings aSettings)
OutputStream.aNode - The node to be serialized. May be any kind of node (incl.
documents). May not be null.aOS - The output stream to write to. May not be null. The
output stream is closed anyway directly after the operation finishes
(on success and on error).aSettings - The settings to be used for the creation. May not be
null.ESuccess@Nonnull public static ESuccess writeToWriter(@Nonnull IMicroNode aNode, @Nonnull @WillClose Writer aWriter, @Nonnull IXMLWriterSettings aSettings)
Writer.aNode - The node to be serialized. May be any kind of node (incl.
documents). May not be null.aWriter - The writer to write to. May not be null. The writer is
closed anyway directly after the operation finishes (on success and
on error).aSettings - The settings to be used for the creation. May not be
null.ESuccess@Nullable public static String getNodeAsString(@Nonnull IMicroNode aNode, @Nonnull IXMLWriterSettings aSettings)
@Nullable public static String getXMLString(@Nonnull IMicroNode aNode)
XMLWriterSettings.DEFAULT_XML_SETTINGS. This is a specialized
version of getNodeAsString(IMicroNode, IXMLWriterSettings).aNode - The node to be converted to a string. May not be null .Copyright © 2014–2016 Philip Helger. All rights reserved.