Code example for BufferedOutputStream

Methods: close

0
     * @throws IOException 
     */ 
    public void doTestWithStream(boolean skipBinary, boolean noRecurse)
            throws RepositoryException, SAXException, IOException { 
 
        BufferedOutputStream os = new BufferedOutputStream(new FileOutputStream(file));
 
        try { 
            session.exportSystemView(testPath, os, false, false);
            SysViewParser parser = new SysViewParser(testPath, session, SAVEBINARY, RECURSE);
            parser.parse(file);
        } catch (RepositoryException re) {
            fail("Could not initialize the contenthandler due to: " + re.toString());
        } finally { 
            os.close();
        } 
 
    } 
 
    /** 
     * class to parse the XML file generated by the sysview export using an