From 8bb5b8a9f34a770a4af85c9b8b079454b6dfd3c7 Mon Sep 17 00:00:00 2001 From: Unbit Date: Fri, 8 Mar 2013 20:30:26 +0100 Subject: [PATCH] removed old java test --- utest.java | 51 --------------------------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 utest.java diff --git a/utest.java b/utest.java deleted file mode 100644 index f3c63033..00000000 --- a/utest.java +++ /dev/null @@ -1,51 +0,0 @@ -import java.util.Hashtable; -import java.lang.Integer; -import java.util.ArrayList; -import java.io.FileDescriptor; -import java.io.FileInputStream; - -public class utest { - - public static void main (String args[]) { - System.out.println("I am the main() method"); - } - - void HelloWorld() { - System.out.println("Hello World!"); - } - - - public static Object[] jwsgi(Hashtable env) throws java.io.IOException { - - if (env.containsKey("CONTENT_LENGTH")) { - String s = (String) env.get("CONTENT_LENGTH"); - if (s.length() > 0) { - Integer cl = Integer.parseInt( s ); - FileInputStream f = new FileInputStream( (FileDescriptor) env.get("jwsgi.input") ); - byte[] b = new byte[cl]; - - if (f.read(b) > 0) { - String postdata = new String(b); - System.out.println( postdata ); - } - } - } - - String status = "200 Ok"; - - ArrayList headers = new ArrayList(); - - String[] header = { "Content-type", "text/html" } ; - headers.add(header); - String[] header2 = { "Server", "uWSGI" } ; - headers.add(header2); - - System.out.println( env.get("REQUEST_URI") ); - - String body = "
" + env.get("REQUEST_URI"); - - Object[] response = { status, headers, body }; - - return response; - } -}