Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.osee.ote.io/src/org/eclipse/osee/ote/io/internal/SystemOutputImpl.java')
-rw-r--r--plugins/org.eclipse.osee.ote.io/src/org/eclipse/osee/ote/io/internal/SystemOutputImpl.java71
1 files changed, 0 insertions, 71 deletions
diff --git a/plugins/org.eclipse.osee.ote.io/src/org/eclipse/osee/ote/io/internal/SystemOutputImpl.java b/plugins/org.eclipse.osee.ote.io/src/org/eclipse/osee/ote/io/internal/SystemOutputImpl.java
deleted file mode 100644
index db65ac42aa2..00000000000
--- a/plugins/org.eclipse.osee.ote.io/src/org/eclipse/osee/ote/io/internal/SystemOutputImpl.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package org.eclipse.osee.ote.io.internal;
-
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-
-import org.eclipse.osee.ote.io.OTEServerFolder;
-import org.eclipse.osee.ote.io.SystemOutput;
-import org.eclipse.osee.ote.io.SystemOutputListener;
-import org.eclipse.osee.ote.properties.OtePropertiesCore;
-
-public class SystemOutputImpl implements SystemOutput {
-
- private static final String SYSTEM_OUT_FILE = "systemout.txt";
-
- private BufferedOutputStream outputStream;
-
- private OTEServerFolder serverFolder;
-
- public void start() {
- if(OtePropertiesCore.ioRedirect.getBooleanValue(false)){
- if(OtePropertiesCore.ioRedirectFile.getBooleanValue(false)){
- File wd = serverFolder.getCurrentServerFolder();
- wd.mkdirs();
- if(wd.exists() && wd.isDirectory()){
- try {
- outputStream = new BufferedOutputStream(new FileOutputStream(new File(wd, SYSTEM_OUT_FILE)));
- EarlyIORedirect.getInstance().addListener(new SystemOutputListerImpl(outputStream));
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- }
- }
- }
- }
- }
-
- public void stop(){
- try {
- if(outputStream != null){
- outputStream.flush();
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- public void bindOTEServerFolder(OTEServerFolder folder) {
- this.serverFolder = folder;
- }
-
- public void unbindOTEServerFolder(OTEServerFolder folder) {
- this.serverFolder = null;
- }
-
- @Override
- public void addListener(SystemOutputListener listener){
- EarlyIORedirect.getInstance().addListener(listener);
- }
-
- @Override
- public void removeListener(SystemOutputListener listener){
- EarlyIORedirect.getInstance().removeListener(listener);
- }
-
- @Override
- public synchronized void write(String input){
- EarlyIORedirect.getInstance().write(input);
- }
-}

Back to the top