(int from)
| 6 | public class Ports { |
| 7 | |
| 8 | static public int nextAvailable(int from) |
| 9 | { |
| 10 | for(int i=from;i<Integer.MAX_VALUE;i++) |
| 11 | { |
| 12 | if (available(i)) return i; |
| 13 | } |
| 14 | throw new RuntimeException(); |
| 15 | } |
| 16 | |
| 17 | static public boolean available(int port) { |
| 18 | Socket s = null; |
no test coverage detected