@ Nonnull public static ESuccess writeList ( @ Nonnull final Collection < String > aCollection , @ Nonnull @ WillClose final OutputStream aOS ) { ValueEnforcer . notNull ( aCollection , "Collection" ) ; ValueEnforcer . notNull ( aOS , "OutputStream" ) ; try { final IMicroDocument aDoc = createListDocument ( aCollection ) ; return MicroWriter . writeToStream ( aDoc , aOS , XMLWriterSettings . DEFAULT_XML_SETTINGS ) ; } finally { StreamHelper . close ( aOS ) ; } }
Write the passed collection to the passed output stream using the predefined XML layout .