@Immutable public final class MicroWriter extends Object
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
getNodeAsBytes(IMicroNode aNode)
Convert the passed micro node to an XML byte array using
XMLWriterSettings.DEFAULT_XML_SETTINGS. |
static byte[] |
getNodeAsBytes(IMicroNode aNode,
IXMLWriterSettings aSettings)
Convert the passed micro node to an XML byte array using the provided
settings.
|
static String |
getNodeAsString(IMicroNode aNode)
Convert the passed micro node to an XML string using
XMLWriterSettings.DEFAULT_XML_SETTINGS. |
static String |
getNodeAsString(IMicroNode aNode,
IXMLWriterSettings aSettings)
Convert the passed micro node to an XML string using the provided settings.
|
static com.helger.commons.state.ESuccess |
writeToFile(IMicroNode aNode,
File aFile)
Write a Micro Node to a file using the default settings.
|
static com.helger.commons.state.ESuccess |
writeToFile(IMicroNode aNode,
File aFile,
IXMLWriterSettings aSettings)
Write a Micro Node to a file.
|
static com.helger.commons.state.ESuccess |
writeToFile(IMicroNode aNode,
Path aPath)
Write a Micro Node to a file using the default settings.
|
static com.helger.commons.state.ESuccess |
writeToFile(IMicroNode aNode,
Path aPath,
IXMLWriterSettings aSettings)
Write a Micro Node to a file.
|
static com.helger.commons.state.ESuccess |
writeToStream(IMicroNode aNode,
OutputStream aOS)
Write a Micro Node to an output stream using the default settings.
|
static com.helger.commons.state.ESuccess |
writeToStream(IMicroNode aNode,
OutputStream aOS,
IXMLWriterSettings aSettings)
Write a Micro Node to an
OutputStream. |
static com.helger.commons.state.ESuccess |
writeToWriter(IMicroNode aNode,
Writer aWriter)
Write a Micro Node to a
Writer using the default
XMLWriterSettings.DEFAULT_XML_SETTINGS. |
static com.helger.commons.state.ESuccess |
writeToWriter(IMicroNode aNode,
Writer aWriter,
IXMLWriterSettings aSettings)
Write a Micro Node to a
Writer. |
@Nonnull public static com.helger.commons.state.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 com.helger.commons.state.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 com.helger.commons.state.ESuccess writeToFile(@Nonnull IMicroNode aNode, @Nonnull Path aPath)
aNode - The node to be serialized. May be any kind of node (incl.
documents). May not be null.aPath - The file to write to. May not be null.ESuccess@Nonnull public static com.helger.commons.state.ESuccess writeToFile(@Nonnull IMicroNode aNode, @Nonnull Path aPath, @Nonnull IXMLWriterSettings aSettings)
aNode - The node to be serialized. May be any kind of node (incl.
documents). May not be null.aPath - 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 com.helger.commons.state.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 com.helger.commons.state.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 com.helger.commons.state.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@Nonnull public static com.helger.commons.state.ESuccess writeToWriter(@Nonnull IMicroNode aNode, @Nonnull @WillClose Writer aWriter)
Writer using the default
XMLWriterSettings.DEFAULT_XML_SETTINGS.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).ESuccess@Nullable public static String getNodeAsString(@Nonnull IMicroNode aNode, @Nonnull IXMLWriterSettings aSettings)
aNode - The node to be converted to a string. May not be null .aSettings - The XML writer settings to use. May not be null.@Nullable public static String getNodeAsString(@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 .@Nullable public static byte[] getNodeAsBytes(@Nonnull IMicroNode aNode, @Nonnull IXMLWriterSettings aSettings)
aNode - The node to be converted to a byte array. May not be
null .aSettings - The XML writer settings to use. May not be null.@Nullable public static byte[] getNodeAsBytes(@Nonnull IMicroNode aNode)
XMLWriterSettings.DEFAULT_XML_SETTINGS. This is a specialized
version of getNodeAsBytes(IMicroNode, IXMLWriterSettings).aNode - The node to be converted to a byte array. May not be
null .Copyright © 2014–2018 Philip Helger. All rights reserved.