@@ -0,0 +1,2414 @@
+//A simple daemon for client apps testing which listens to HTTP port, returns simple message and logs processing status and the incoming request headers to stdout %0A%0Aimport java.net.ServerSocket;%0Aimport java.net.Socket;%0Aimport java.io.InputStream;%0Aimport java.io.OutputStream;%0Aimport java.io.InputStreamReader;%0Aimport java.io.BufferedReader;%0A%0Apublic class NetTest %7B%0A%0A    public static void main(String%5B%5D args) throws Throwable %7B%0A        ServerSocket ss = new ServerSocket(8088);%0A        while (true) %7B%0A            Socket s = ss.accept();%0A            System.err.println(%22Client accepted%22);%0A            new Thread(new SocketProcessor(s)).start();%0A        %7D%0A    %7D%0A%0A    private static class SocketProcessor implements Runnable %7B%0A%0A        private StringBuffer showResp = new StringBuffer();%0A        private Socket s;%0A        private InputStream is;%0A        private OutputStream os;%0A%0A        private SocketProcessor(Socket s) throws Throwable %7B%0A            this.s = s;%0A            this.is = s.getInputStream();%0A            this.os = s.getOutputStream();%0A        %7D%0A%0A        public void run() %7B%0A            try %7B%0A                readInputHeaders();%0A%0A                writeResponse(%22%3Chtml%3E%3Cbody%3E%3Ch1%3EHello from TestServer%3C/h1%3E%3C/body%3E%3C/html%3E%22);%0A            %7D catch (Throwable t) %7B%0A            %7D finally %7B%0A                try %7B%0A                    s.close();%0A                %7D catch (Throwable t) %7B%0A                %7D%0A            %7D%0A            System.err.println(%22Client processing finished%22);%0A        %7D%0A%0A        private void writeResponse(String s) throws Throwable %7B%0A            String response = %22HTTP/1.1 200 OK%5Cr%5Cn%22%0A                    + %22Server: NetTestDaemon%5Cr%5Cn%22%0A                    + %22Content-Type: text/html%5Cr%5Cn%22%0A                    + %22Content-Length: %22 + s.length() + %22%5Cr%5Cn%22%0A                    + %22Connection: close%5Cr%5Cn%5Cr%5Cn%22;%0A            String result = response + s;%0A            os.write(result.getBytes());%0A            os.flush();%0A        %7D%0A%0A        private void readInputHeaders() throws Throwable %7B%0A            BufferedReader br = new BufferedReader(new InputStreamReader(is));%0A            while (true) %7B%0A                String check = br.readLine();%0A                if (check == null %7C%7C check.trim().length() == 0) %7B%0A                    System.err.println(showResp);%0A                    break;%0A                %7D else %7B%0A                    showResp.append(check);%0A                %7D%0A            %7D%0A        %7D%0A    %7D%0A%7D%0A

Create NetTest.java