Commit 8ba16551 authored by Robert Greenwalt's avatar Robert Greenwalt Committed by Android (Google) Code Review
Browse files

Merge "Fix build." into honeycomb-plus-aosp

parents 1b20abd3 37e433fd
......@@ -20,6 +20,7 @@ import java.net.InetAddress;
import java.net.Inet4Address;
import java.net.Inet6Address;
import java.net.UnknownHostException;
import java.util.Collection;
import android.util.Log;
......@@ -235,4 +236,18 @@ public class NetworkUtils {
throw new IllegalArgumentException(e);
}
}
/**
* Create a string array of host addresses from a collection of InetAddresses
* @param addrs a Collection of InetAddresses
* @return an array of Strings containing their host addresses
*/
public static String[] makeStrings(Collection<InetAddress> addrs) {
String[] result = new String[addrs.size()];
int i = 0;
for (InetAddress addr : addrs) {
result[i++] = addr.getHostAddress();
}
return result;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment