private static LinkedList tryProxies(LinkedList inputProxies) throws IOException { LinkedList workingProxies = new LinkedList(); for(String currentProxy : inputProxies) { String tmp[] = currentProxy.split(":"); try { if(connect(tmp[0], Integer.parseInt(tmp[1]))) { workingProxies.add(currentProxy); } } catch (Exception e) {} } return workingProxies; }