/** * Converts an array of byte arrays representing raw IP addresses of a host * to an array of InetAddress objects. * * @param rawAddresses the raw addresses to convert. * @param hostName the hostname corresponding to the IP address. * @return the corresponding InetAddresses, appropriately sorted. */ private static InetAddress[] bytesToInetAddresses(byte[][] rawAddresses, String hostName) throws UnknownHostException { // Convert the byte arrays to InetAddresses. InetAddress[] returnedAddresses = new InetAddress[rawAddresses.length]; for (int i = 0; i < rawAddresses.length; i++) { returnedAddresses[i] = makeInetAddress(rawAddresses[i], hostName); } return returnedAddresses; }
private static InetAddress getHostByAddrImpl(InetAddress address) throws UnknownHostException { BlockGuard.getThreadPolicy().onNetwork(); try { String hostname = Libcore.os.getnameinfo(address, NI_NAMEREQD); return makeInetAddress(address.ipaddress.clone(), hostname); } catch (GaiException gaiException) { throw gaiException.rethrowAsUnknownHostException(); } }
/** * Converts an array of byte arrays representing raw IP addresses of a host * to an array of InetAddress objects. * * @param rawAddresses the raw addresses to convert. * @param hostName the hostname corresponding to the IP address. * @return the corresponding InetAddresses, appropriately sorted. */ private static InetAddress[] bytesToInetAddresses(byte[][] rawAddresses, String hostName) throws UnknownHostException { // Convert the byte arrays to InetAddresses. InetAddress[] returnedAddresses = new InetAddress[rawAddresses.length]; for (int i = 0; i < rawAddresses.length; i++) { returnedAddresses[i] = makeInetAddress(rawAddresses[i], hostName); } return returnedAddresses; }
/** * Converts an array of byte arrays representing raw IP addresses of a host * to an array of InetAddress objects. * * @param rawAddresses the raw addresses to convert. * @param hostName the hostname corresponding to the IP address. * @return the corresponding InetAddresses, appropriately sorted. */ private static InetAddress[] bytesToInetAddresses(byte[][] rawAddresses, String hostName) throws UnknownHostException { // Convert the byte arrays to InetAddresses. InetAddress[] returnedAddresses = new InetAddress[rawAddresses.length]; for (int i = 0; i < rawAddresses.length; i++) { returnedAddresses[i] = makeInetAddress(rawAddresses[i], hostName); } return returnedAddresses; }
/** * Converts an array of byte arrays representing raw IP addresses of a host * to an array of InetAddress objects. * * @param rawAddresses the raw addresses to convert. * @param hostName the hostname corresponding to the IP address. * @return the corresponding InetAddresses, appropriately sorted. */ private static InetAddress[] bytesToInetAddresses(byte[][] rawAddresses, String hostName) throws UnknownHostException { // Convert the byte arrays to InetAddresses. InetAddress[] returnedAddresses = new InetAddress[rawAddresses.length]; for (int i = 0; i < rawAddresses.length; i++) { returnedAddresses[i] = makeInetAddress(rawAddresses[i], hostName); } return returnedAddresses; }
/** * Converts an array of byte arrays representing raw IP addresses of a host * to an array of InetAddress objects. * * @param rawAddresses the raw addresses to convert. * @param hostName the hostname corresponding to the IP address. * @return the corresponding InetAddresses, appropriately sorted. */ private static InetAddress[] bytesToInetAddresses(byte[][] rawAddresses, String hostName) throws UnknownHostException { // Convert the byte arrays to InetAddresses. InetAddress[] returnedAddresses = new InetAddress[rawAddresses.length]; for (int i = 0; i < rawAddresses.length; i++) { returnedAddresses[i] = makeInetAddress(rawAddresses[i], hostName); } return returnedAddresses; }
/** * Converts an array of byte arrays representing raw IP addresses of a host * to an array of InetAddress objects. * * @param rawAddresses the raw addresses to convert. * @param hostName the hostname corresponding to the IP address. * @return the corresponding InetAddresses, appropriately sorted. */ private static InetAddress[] bytesToInetAddresses(byte[][] rawAddresses, String hostName) throws UnknownHostException { // Convert the byte arrays to InetAddresses. InetAddress[] returnedAddresses = new InetAddress[rawAddresses.length]; for (int i = 0; i < rawAddresses.length; i++) { returnedAddresses[i] = makeInetAddress(rawAddresses[i], hostName); } return returnedAddresses; }
/** * Converts an array of byte arrays representing raw IP addresses of a host * to an array of InetAddress objects. * * @param rawAddresses the raw addresses to convert. * @param hostName the hostname corresponding to the IP address. * @return the corresponding InetAddresses, appropriately sorted. */ private static InetAddress[] bytesToInetAddresses(byte[][] rawAddresses, String hostName) throws UnknownHostException { // Convert the byte arrays to InetAddresses. InetAddress[] returnedAddresses = new InetAddress[rawAddresses.length]; for (int i = 0; i < rawAddresses.length; i++) { returnedAddresses[i] = makeInetAddress(rawAddresses[i], hostName); } return returnedAddresses; }
private static InetAddress getHostByAddrImpl(InetAddress address) throws UnknownHostException { BlockGuard.getThreadPolicy().onNetwork(); try { String hostname = Libcore.os.getnameinfo(address, NI_NAMEREQD); return makeInetAddress(address.ipaddress.clone(), hostname); } catch (GaiException gaiException) { throw gaiException.rethrowAsUnknownHostException(); } }
private static InetAddress getHostByAddrImpl(InetAddress address) throws UnknownHostException { BlockGuard.getThreadPolicy().onNetwork(); try { String hostname = Libcore.os.getnameinfo(address, NI_NAMEREQD); return makeInetAddress(address.ipaddress.clone(), hostname); } catch (GaiException gaiException) { throw gaiException.rethrowAsUnknownHostException(); } }
private static InetAddress getHostByAddrImpl(InetAddress address) throws UnknownHostException { BlockGuard.getThreadPolicy().onNetwork(); try { String hostname = Libcore.os.getnameinfo(address, NI_NAMEREQD); return makeInetAddress(address.ipaddress.clone(), hostname); } catch (GaiException gaiException) { throw gaiException.rethrowAsUnknownHostException(); } }
private static InetAddress getHostByAddrImpl(InetAddress address) throws UnknownHostException { BlockGuard.getThreadPolicy().onNetwork(); try { String hostname = Libcore.os.getnameinfo(address, NI_NAMEREQD); return makeInetAddress(address.ipaddress.clone(), hostname); } catch (GaiException gaiException) { throw gaiException.rethrowAsUnknownHostException(); } }
private static InetAddress getHostByAddrImpl(InetAddress address) throws UnknownHostException { BlockGuard.getThreadPolicy().onNetwork(); try { String hostname = Libcore.os.getnameinfo(address, NI_NAMEREQD); return makeInetAddress(address.ipaddress.clone(), hostname); } catch (GaiException gaiException) { throw gaiException.rethrowAsUnknownHostException(); } }
private static InetAddress getHostByAddrImpl(InetAddress address) throws UnknownHostException { BlockGuard.getThreadPolicy().onNetwork(); try { String hostname = Libcore.os.getnameinfo(address, NI_NAMEREQD); return makeInetAddress(address.ipaddress.clone(), hostname); } catch (GaiException gaiException) { throw gaiException.rethrowAsUnknownHostException(); } }