FileDocCategorySizeDatePackage
DhcpInfo.javaAPI DocAndroid 1.5 API3054Wed May 06 22:41:54 BST 2009android.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();
    
Methods Summary
public intdescribeContents()
Implement the Parcelable interface {@hide}

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

        buf.append(addr  & 0xff).append('.").
            append((addr >>>= 8) & 0xff).append('.").
            append((addr >>>= 8) & 0xff).append('.").
            append((addr >>>= 8) & 0xff);
    
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);