290 //
291 // GET ADDRESS METHODS
292 //
293
294 /**
295 * Returns the address of the remote peer for this connection.
296 */
297 @Override
298 public final InetAddress getInetAddress() {
299 if (self == this) {
300 return super.getInetAddress();
301 } else {
302 return self.getInetAddress();
303 }
304 }
305
306 /**
307 * Gets the local address to which the socket is bound.
308 *
309 * @return the local address to which the socket is bound.
310 * @since JDK1.1
311 */
312 @Override
313 public final InetAddress getLocalAddress() {
314 if (self == this) {
315 return super.getLocalAddress();
316 } else {
317 return self.getLocalAddress();
318 }
319 }
320
321 /**
322 * Returns the number of the remote port that this connection uses.
323 */
324 @Override
325 public final int getPort() {
326 if (self == this) {
327 return super.getPort();
328 } else {
329 return self.getPort();
330 }
|
290 //
291 // GET ADDRESS METHODS
292 //
293
294 /**
295 * Returns the address of the remote peer for this connection.
296 */
297 @Override
298 public final InetAddress getInetAddress() {
299 if (self == this) {
300 return super.getInetAddress();
301 } else {
302 return self.getInetAddress();
303 }
304 }
305
306 /**
307 * Gets the local address to which the socket is bound.
308 *
309 * @return the local address to which the socket is bound.
310 * @since 1.1
311 */
312 @Override
313 public final InetAddress getLocalAddress() {
314 if (self == this) {
315 return super.getLocalAddress();
316 } else {
317 return self.getLocalAddress();
318 }
319 }
320
321 /**
322 * Returns the number of the remote port that this connection uses.
323 */
324 @Override
325 public final int getPort() {
326 if (self == this) {
327 return super.getPort();
328 } else {
329 return self.getPort();
330 }
|