- @SuppressWarnings("unused")
- public static BufferedReader getBuffereReader(Object file) throws FileNotFoundException {
- if (file instanceof String)
- return new BufferedReader(new FileReader((String) file));
-
- byte[] bytes = /** @j2sNative file._bytes || */ null;
- if (bytes != null)
- return new BufferedReader(new InputStreamReader(new ByteArrayInputStream(bytes)));
- return new BufferedReader(new FileReader((File) file));
+ private void setShouldBeSaved()
+ {
+ if (protocol == null)
+ return;
+ AlignFrame af = this.alignFrame;
+ if (af == null)
+ return;
+ AlignViewport avp = af.getViewport();
+ if (avp == null)
+ return;
+ boolean upToDate = !protocol.isDynamic();
+ if (protocol.isUrl() && !Cache
+ .getDefault(PROMPT_SAVE_UNCHANGED_URL_ALIGNMENTS, true))
+ {
+ upToDate = true;
+ }
+ avp.setSavedUpToDate(upToDate,
+ upToDate ? null : QuitHandler.Message.UNSAVED_ALIGNMENTS);
+ }
+
+ public static final String PROMPT_SAVE_UNCHANGED_URL_ALIGNMENTS = "PROMPT_SAVE_UNCHANGED_URL_ALIGNMENTS";
+
+ public static boolean getUseDefaultFileFormat()
+ {
+ return useDefaultFileFormat;