先看我的程序public static void main(String[] args) throws UnknownHostException,
            IOException {
            
            FileReader reader = new FileReader("D:\\52mp\\test.txt");
            BufferedReader br = new BufferedReader(reader);
            String s1 = null;
            while ((s1 = br.readLine()) != null) {
                            System.out.println(s2);}
            br.close();
            reader.close();//读取文本文件            Socket clientSocket = new Socket("61.55.138.243", 80);
            DataOutputStream outbound = new DataOutputStream(clientSocket
                    .getOutputStream());
            DataInputStream inbound = new DataInputStream(clientSocket
                    .getInputStream());
            
            outbound.writeBytes(s1 + "\r\n");
            outbound.flush();
            String responseLine; 
            while ( (responseLine = inbound.readLine()) != null) 
            { 
            System.out.println(responseLine); 
            } 
    
            outbound.close();
            inbound.close();
            clientSocket.close();
                            }
    }
}上面我的代码,提取test.txt的数据包文件,然后向web提交。现在我想用代理,网上看了不少文章,都引用一篇文章的内容,采用以下的方式:
    System.getProperties().put("proxySet", "true");
    System.getProperties().put("proxyHost", proxy);
    System.getProperties().put("proxyPort", proxyPort);
但是我在源码中使用后,好像没有效果,即设置不存在的代理都能完成数据的提交,也就是是说程序里的代理设置是无效的,有哪个好心人,给一个完整的代码,或者更详尽的解决方案