DataOutputStream stream = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(file)));  Group group2save = drawingSurface.getViewGroup(); String path2remove = group2save.getAbsoluteName(); if (!path2remove.equals("")) path2remove+=Constants.GROUP_SEPARATOR;  stream.writeBytes("#! Generated by VisualDCT for Java v"+Version.VERSION+"\n"); writeUsedDBDs(stream); group2save.writeObjects(stream, path2remove);  stream.writeBytes("\n#! Further lines contain layout data used by VisualDCT\n\n"); group2save.writeVDCTData(stream, path2remove);  stream.flush(); stream.close();
Group.save(drawingSurface.getViewGroup(), file);
public void saveAsGroup(java.io.File file) throws IOException { DataOutputStream stream = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(file))); Group group2save = drawingSurface.getViewGroup(); String path2remove = group2save.getAbsoluteName(); if (!path2remove.equals("")) path2remove+=Constants.GROUP_SEPARATOR;  stream.writeBytes("#! Generated by VisualDCT for Java v"+Version.VERSION+"\n"); writeUsedDBDs(stream); group2save.writeObjects(stream, path2remove);  stream.writeBytes("\n#! Further lines contain layout data used by VisualDCT\n\n"); group2save.writeVDCTData(stream, path2remove); stream.flush(); stream.close();}