/** Opens outputstream for writing. */ public static FILE write(String file) { // see if we could shuffle the files // if not we can't open the file if (!shuffleVersions(file)) { return null; } try { FileOutputStream fileOutputStream = new FileOutputStream(file); FILE output = new FILE(); output.outputStream = fileOutputStream; output.setCharactersInBuffer(0); return output; } catch (Exception e) { setException(e); return null; } }