aboutsummaryrefslogtreecommitdiffstats
path: root/plugin/icedteanp/java/sun/applet/PluginStreamHandler.java
diff options
context:
space:
mode:
authorAndrew Su <[email protected]>2011-01-20 14:54:27 -0500
committerAndrew Su <[email protected]>2011-01-20 14:54:27 -0500
commitbb6b80c486570b23c058ea0ff9ce97ad3834a53a (patch)
tree5c04165d776a877628fa6c00418f02b383d7aa8d /plugin/icedteanp/java/sun/applet/PluginStreamHandler.java
parentef785a49ec6f4dd970098f9a2a0ed7d69c7390c2 (diff)
Remove dead, commented, unused code.
Diffstat (limited to 'plugin/icedteanp/java/sun/applet/PluginStreamHandler.java')
-rw-r--r--plugin/icedteanp/java/sun/applet/PluginStreamHandler.java67
1 files changed, 0 insertions, 67 deletions
diff --git a/plugin/icedteanp/java/sun/applet/PluginStreamHandler.java b/plugin/icedteanp/java/sun/applet/PluginStreamHandler.java
index bd95493..4eff8dd 100644
--- a/plugin/icedteanp/java/sun/applet/PluginStreamHandler.java
+++ b/plugin/icedteanp/java/sun/applet/PluginStreamHandler.java
@@ -39,13 +39,11 @@ package sun.applet;
import java.io.BufferedReader;
import java.io.BufferedWriter;
-import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
-import java.io.StreamTokenizer;
import java.net.MalformedURLException;
import java.nio.charset.Charset;
import java.util.Date;
@@ -56,7 +54,6 @@ import javax.swing.SwingUtilities;
public class PluginStreamHandler {
private BufferedReader pluginInputReader;
- private StreamTokenizer pluginInputTokenizer;
private BufferedWriter pluginOutputWriter;
private RequestQueue queue = new RequestQueue();
@@ -70,10 +67,6 @@ public class PluginStreamHandler {
PluginAppletViewer pav;
- static Date d = new Date();
- static long startTime = d.getTime();
- static long totalWait = 0;
-
public PluginStreamHandler(InputStream inputstream, OutputStream outputstream)
throws MalformedURLException, IOException {
@@ -82,13 +75,10 @@ public class PluginStreamHandler {
pav = (PluginAppletViewer) ClassLoader.getSystemClassLoader().loadClass("sun.applet.PluginAppletViewer").newInstance();
PluginDebug.debug("Loaded: " + pav + " CL=" + pav.getClass().getClassLoader());
} catch (InstantiationException e) {
- // TODO Auto-generated catch block
e.printStackTrace();
} catch (IllegalAccessException e) {
- // TODO Auto-generated catch block
e.printStackTrace();
} catch (ClassNotFoundException e) {
- // TODO Auto-generated catch block
e.printStackTrace();
}
@@ -99,23 +89,9 @@ public class PluginStreamHandler {
pluginInputReader =
new BufferedReader(new InputStreamReader(inputstream,
Charset.forName("UTF-8")));
- /*pluginInputTokenizer = new StreamTokenizer(pluginInputReader);
- pluginInputTokenizer.resetSyntax();
- pluginInputTokenizer.whitespaceChars('\u0000', '\u0000');
- pluginInputTokenizer.wordChars('\u0001', '\u00FF');*/
pluginOutputWriter =
new BufferedWriter(new OutputStreamWriter
(outputstream, Charset.forName("UTF-8")));
-
- /*
- while(true) {
- String message = read();
- PluginDebug.debug(message);
- handleMessage(message);
- // TODO:
- // write(queue.peek());
- }
- */
}
public void startProcessing() {
@@ -128,15 +104,8 @@ public class PluginStreamHandler {
PluginDebug.debug("Waiting for data...");
- long b4 = new Date().getTime();
-
String s = read();
- long after = new Date().getTime();
-
- totalWait += (after - b4);
- //System.err.println("Total wait time: " + totalWait);
-
if (s != null) {
consumer.queue(s);
} else {
@@ -152,35 +121,6 @@ public class PluginStreamHandler {
PluginDebug.debug("APPLETVIEWER: exiting appletviewer");
System.exit(0);
}
-
- /*
- int readChar = -1;
- // blocking read, discard first character
- try {
- readChar = pluginInputReader.read();
- } catch (IOException ioe) {
- // plugin may have detached
- }
-
- // if not disconnected
- if (readChar != -1) {
- String s = read();
- PluginDebug.debug("Got data, consuming " + s);
- consumer.consume(s);
- } else {
- try {
- // Close input/output channels to plugin.
- pluginInputReader.close();
- pluginOutputWriter.close();
- } catch (IOException exception) {
- // Deliberately ignore IOException caused by broken
- // pipe since plugin may have already detached.
- }
- AppletSecurityContextManager.dumpStore(0);
- PluginDebug.debug("APPLETVIEWER: exiting appletviewer");
- System.exit(0);
- }
- */
}
}
};
@@ -411,13 +351,6 @@ public class PluginStreamHandler {
}
return;
- /*
- synchronized(writeQueue) {
- writeQueue.add(message);
- PluginDebug.debug(" PIPE: appletviewer wrote: " + message);
- }
- */
-
}
public boolean messageAvailable() {