Code example for StringWriter

Methods: closeflushtoString

0
    } 
 
    private String toCOBieLite(COBIEDocument coBieDocument) throws IOException
    { 
        FacilityFactory factory = new FacilityFactory();
        StringWriter wrt = new StringWriter();
        factory.parse(coBieDocument).save(wrt, org.erdc.cobie.cobielite.Settings.XML_Beans_Settings
                .getSaveSettings());  
        wrt.flush();
        wrt.close();
        return wrt.toString();
    } 
     
    @Override 
    protected void writeCOBIE(OutputStream outputStream)
            throws SerializerException 
    { 
        try 
        { 
            executeTransform(outputStream);
        }