308 |
*/ |
*/ |
309 |
public void bind (SocketAddress bindpoint) throws IOException |
public void bind (SocketAddress bindpoint) throws IOException |
310 |
{ |
{ |
311 |
|
if ( !(bindpoint instanceof InetSocketAddress)) |
312 |
|
throw new IllegalArgumentException (); |
313 |
|
|
314 |
|
InetSocketAddress tmp = (InetSocketAddress) bindpoint; |
315 |
|
impl.bind (tmp.getAddress(), tmp.getPort()); |
316 |
} |
} |
317 |
|
|
318 |
/** |
/** |
330 |
public void connect (SocketAddress endpoint) |
public void connect (SocketAddress endpoint) |
331 |
throws IOException |
throws IOException |
332 |
{ |
{ |
333 |
|
if (! (endpoint instanceof InetSocketAddress)) |
334 |
|
throw new IllegalArgumentException ("Address type not supported"); |
335 |
|
|
336 |
|
if (ch != null && !ch.isBlocking ()) |
337 |
|
throw new IllegalBlockingModeException (); |
338 |
|
|
339 |
|
impl.connect (endpoint, 0); |
340 |
} |
} |
341 |
|
|
342 |
/** |
/** |
357 |
public void connect (SocketAddress endpoint, int timeout) |
public void connect (SocketAddress endpoint, int timeout) |
358 |
throws IOException |
throws IOException |
359 |
{ |
{ |
360 |
|
if (! (endpoint instanceof InetSocketAddress)) |
361 |
|
throw new IllegalArgumentException ("Address type not supported"); |
362 |
|
|
363 |
|
if (ch != null && !ch.isBlocking ()) |
364 |
|
throw new IllegalBlockingModeException (); |
365 |
|
|
366 |
|
impl.connect (endpoint, timeout); |
367 |
} |
} |
368 |
|
|
369 |
/** |
/** |
616 |
*/ |
*/ |
617 |
public void sendUrgentData (int data) throws IOException |
public void sendUrgentData (int data) throws IOException |
618 |
{ |
{ |
619 |
|
impl.sendUrgentData (data); |
620 |
} |
} |
621 |
|
|
622 |
/** |
/** |
902 |
*/ |
*/ |
903 |
public void shutdownInput() throws IOException |
public void shutdownInput() throws IOException |
904 |
{ |
{ |
905 |
|
if (impl != null) |
906 |
|
impl.shutdownInput(); |
907 |
|
|
908 |
inputShutdown = true; |
inputShutdown = true; |
909 |
} |
} |
910 |
|
|
915 |
*/ |
*/ |
916 |
public void shutdownOutput() throws IOException |
public void shutdownOutput() throws IOException |
917 |
{ |
{ |
918 |
|
if (impl != null) |
919 |
|
impl.shutdownOutput(); |
920 |
|
|
921 |
outputShutdown = true; |
outputShutdown = true; |
922 |
} |
} |
923 |
|
|