this.main.setXcasFileOpenDir(xcasFile.getParentFile());
try {
OutputStream outStream = new BufferedOutputStream(new FileOutputStream(xcasFile));
XMLSerializer xmlSerializer = new XMLSerializer(outStream);
XCASSerializer xcasSerializer = new XCASSerializer(this.main.getCas().getTypeSystem());
xcasSerializer.serialize(this.main.getCas(), xmlSerializer.getContentHandler());
outStream.close();
} catch (IOException e) {
this.main.handleException(e);
} catch (SAXException e) {
this.main.handleException(e);