/** @param container must not be null. */ public static IonWriter makeSystemWriter(IonContainer container) { IonSystem sys = container.getSystem(); IonCatalog cat = sys.getCatalog(); SymbolTable defaultSystemSymtab = sys.getSystemSymbolTable(); IonWriter writer = new IonWriterSystemTree(defaultSystemSymtab, cat, container, null /* initialIvmHandling */); return writer; }
/** @param container must not be null. */ public static IonWriter makeWriter(IonCatalog catalog, IonContainer container) { IonSystem sys = container.getSystem(); SymbolTable defaultSystemSymtab = sys.getSystemSymbolTable(); // TODO the SUPPRESS here is a nasty discontinuity with other places // that create this kind of reader. It prevents the Lite DG system // iterator from returning two IVMs at the start of the data. // The Span tests detect that problem. IonWriterSystemTree system_writer = new IonWriterSystemTree( defaultSystemSymtab, catalog, container, InitialIvmHandling.SUPPRESS); return new IonWriterUser(catalog, sys, system_writer); }