(SocketAddress address)
| 175 | } |
| 176 | |
| 177 | public void bind(SocketAddress address) |
| 178 | throws IOException |
| 179 | { |
| 180 | InetSocketAddress a; |
| 181 | try { |
| 182 | a = (InetSocketAddress) address; |
| 183 | } catch (ClassCastException e) { |
| 184 | throw new IllegalArgumentException(); |
| 185 | } |
| 186 | |
| 187 | if (a == null) { |
| 188 | SocketChannel.bind(socket, 0, 0); |
| 189 | } else { |
| 190 | SocketChannel.bind |
| 191 | (socket, a.getAddress().getRawAddress(), a.getPort()); |
| 192 | } |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | private static native int makeSocket(); |
nothing calls this directly
no test coverage detected