@@ -0,0 +1,1098 @@
+package com.westudio.java.util;%0A%0Aimport java.io.IOException;%0Aimport java.io.InputStream;%0Aimport java.util.HashMap;%0A%0Apublic class Headers %7B%0A%0A    public static HashMap%3CString, String%3E generateHeaders(InputStream is) throws IOException %7B%0A        HashMap%3CString, String%3E headers = new HashMap%3C%3E();%0A        StringBuilder sb = new StringBuilder();%0A%0A        while (true) %7B%0A            int b = is.read();%0A%0A            if (b %3C 0) %7B%0A                throw new IOException(%22socket connection lost%22);%0A            %7D%0A%0A            if (b == '%5Cr') %7B%0A                continue;%0A            %7D%0A%0A            if (b != '%5Cn') %7B%0A                sb.append((char)b);%0A                continue;%0A            %7D%0A%0A            if (sb.length() == 0) %7B%0A                return headers;%0A            %7D%0A%0A            int index = sb.indexOf(%22:%22);%0A            if (index %3C 0) %7B%0A                // HTTP/1.1 200 OK%0A                headers.put(%22%22, sb.toString());%0A            %7D else %7B%0A                headers.put(sb.toString().substring(0, index), sb.toString().substring(index + 2));%0A            %7D%0A%0A            sb.setLength(0);%0A        %7D%0A    %7D%0A%7D%0A

add a Headers class....