FileDocCategorySizeDatePackage
DhcpInfo.javaAPI DocAndroid 5.1 API3335Thu Mar 12 22:22:10 GMT 2015android.net

DhcpInfo

public class DhcpInfo extends Object implements android.os.Parcelable
A simple object for retrieving the results of a DHCP request.

Fields Summary
public int
ipAddress
public int
gateway
public int
netmask
public int
dns1
public int
dns2
public int
serverAddress
public int
leaseDuration
public static final Creator
CREATOR
Implement the Parcelable interface {@hide}
Constructors Summary
public DhcpInfo()

        super();
    
public DhcpInfo(DhcpInfo source)
copy constructor {@hide}

        if (source != null) {
            ipAddress = source.ipAddress;
            gateway = source.gateway;
            netmask = source.netmask;
            dns1 = source.dns1;
            dns2 = source.dns2;
            serverAddress = source.serverAddress;
            leaseDuration = source.leaseDuration;
        }
    
Methods Summary
public intdescribeContents()
Implement the Parcelable interface {@hide}

        return 0;
    
private static voidputAddress(java.lang.StringBuffer buf, int addr)

        buf.append(NetworkUtils.intToInetAddress(addr).getHostAddress());
    
public java.lang.StringtoString()

        StringBuffer str = new StringBuffer();

        str.append("ipaddr "); putAddress(str, ipAddress);
        str.append(" gateway "); putAddress(str, gateway);
        str.append(" netmask "); putAddress(str, netmask);
        str.append(" dns1 "); putAddress(str, dns1);
        str.append(" dns2 "); putAddress(str, dns2);
        str.append(" DHCP server "); putAddress(str, serverAddress);
        str.append(" lease ").append(leaseDuration).append(" seconds");

        return str.toString();
    
public voidwriteToParcel(android.os.Parcel dest, int flags)
Implement the Parcelable interface {@hide}

        dest.writeInt(ipAddress);
        dest.writeInt(gateway);
        dest.writeInt(netmask);
        dest.writeInt(dns1);
        dest.writeInt(dns2);
        dest.writeInt(serverAddress);
        dest.writeInt(leaseDuration);