Java Socket Address Get addr_to_sbuf(InetSocketAddress addr, StringBuffer buf)

Here you can find the source of addr_to_sbuf(InetSocketAddress addr, StringBuffer buf)

Description

addtsbuf

License

Open Source License

Declaration

public static void addr_to_sbuf(InetSocketAddress addr, StringBuffer buf) 

Method Source Code

//package com.java2s;
/*//from  w  ww. jav a2 s  .  c  om
 * Copyright (c) 2001-2003 Regents of the University of California.
 * All rights reserved.
 *
 * See the file LICENSE included in this distribution for details.
 */

import java.net.InetSocketAddress;

public class Main {
    public static void addr_to_sbuf(InetSocketAddress addr, StringBuffer buf) {
        buf.append(addr.getAddress().getHostAddress());
        buf.append(":");
        buf.append(addr.getPort());
    }
}

Related

  1. address2String(InetSocketAddress address)
  2. address2string(InetSocketAddress isa)
  3. addressIn(SocketAddress address, String ip)
  4. addressLabel(SocketAddress localAddress, SocketAddress remoteAddress)