/frameworks/base/core/java/android/app/admin/ |
DnsEvent.java | 22 import java.net.InetAddress; 72 public List<InetAddress> getInetAddresses() { 76 final List<InetAddress> inetAddresses = new ArrayList<>(mIpAddresses.length); 80 inetAddresses.add(InetAddress.getByName(ipAddress));
|
/frameworks/opt/net/ethernet/tests/java/com/android/server/ethernet/ |
EthernetTrackerTest.java | 33 import java.net.InetAddress; 106 config.dnsServers.add(InetAddress.parseNumericAddress(dns)); 112 config.gateway = InetAddress.parseNumericAddress(gateway);
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ |
ServerSocketFactoryTest.java | 26 import java.net.InetAddress; 89 ServerSocket ss = sf.createServerSocket(0, 0, InetAddress.getLocalHost()); 93 sf.createServerSocket(ss.getLocalPort(), 0, InetAddress.getLocalHost()); 101 sf.createServerSocket(Integer.MAX_VALUE, 0, InetAddress.getLocalHost()); 126 InetAddress address) throws IOException {
|
SocketFactoryTest.java | 26 import java.net.InetAddress; 63 Socket s = sf.createSocket(InetAddress.getLocalHost().getHostName(), sport); 75 sf.createSocket(InetAddress.getLocalHost().getHostName(), invalidPorts[i]); 82 sf.createSocket(InetAddress.getLocalHost().getHostName(), s.getLocalPort()); 89 f.createSocket(InetAddress.getLocalHost().getHostName(), 8082); 100 Socket s = sf.createSocket(InetAddress.getLocalHost(), sport); 106 sf.createSocket(InetAddress.getLocalHost(), invalidPorts[i]); 113 sf.createSocket(InetAddress.getLocalHost(), s.getLocalPort()); 120 f.createSocket(InetAddress.getLocalHost(), 8081); 130 Socket s = sf.createSocket(InetAddress.getLocalHost(), sport [all...] |
/frameworks/base/core/java/android/printservice/recommendation/ |
RecommendationInfo.java | 28 import java.net.InetAddress; 47 @NonNull private final List<InetAddress> mDiscoveredPrinters; 57 * @param discoveredPrinters The {@link InetAddress addresses} of the discovered 62 @NonNull List<InetAddress> discoveredPrinters, boolean recommendsMultiVendorService) { 79 * @deprecated Use {@link RecommendationInfo(String, String, List<InetAddress>, boolean)} 89 * Read a list of blobs from the parcel and return it as a list of {@link InetAddress 94 * @return The list of {@link InetAddress addresses} or null if no printers were found. 98 @NonNull private static ArrayList<InetAddress> readDiscoveredPrinters(@NonNull Parcel parcel) { 100 ArrayList<InetAddress> discoveredPrinters = new ArrayList<>(numDiscoveredPrinters); 104 discoveredPrinters.add(InetAddress.getByAddress(parcel.readBlob())) [all...] |
/libcore/luni/src/test/java/libcore/java/net/ |
OldAndroidDatagramTest.java | 22 import java.net.InetAddress; 71 packet.setAddress(InetAddress.getLocalHost()); 88 public Reflector(int port, InetAddress address) { 125 reflector = new Reflector(1234, InetAddress.getLocalHost()); 131 socket = new DatagramSocket(2345, InetAddress.getLocalHost()); 138 packet.setAddress(InetAddress.getLocalHost());
|
DatagramSocketTest.java | 23 import java.net.InetAddress; 77 s.connect(InetAddress.getLocalHost(), port); 120 s.connect(InetAddress.getLocalHost(), port); 129 // Unlike connect(InetAddress, int), connect(SocketAddress) can (and should) throw an 132 // connect(InetAddress, int) and this test exists to confirm it stays working. 134 SocketAddress validAddress = new InetSocketAddress(InetAddress.getLocalHost(), 9999); 212 InetAddress packetAddr = p.getAddress(); 217 InetAddress newPacketAddr = p.getAddress();
|
InetAddressTest.java | 28 import java.net.InetAddress; 110 return (Inet6Address) InetAddress.getByAddress(LOOPBACK6_BYTES); 114 return (Inet6Address) InetAddress.getByAddress("ip6-localhost", LOOPBACK6_BYTES); 140 assertEquals(expectedString, InetAddress.parseNumericAddress(address).toString()); 146 InetAddress.parseNumericAddress("example.com"); // Not numeric. 151 // Strange special cases, for compatibility with InetAddress.getByName. 152 assertTrue(InetAddress.parseNumericAddress(null).isLoopbackAddress()); 153 assertTrue(InetAddress.parseNumericAddress("").isLoopbackAddress()); 160 InetAddress.parseNumericAddress(invalid); 191 assertTrue(InetAddress.isNumeric(valid)) [all...] |
OldServerSocketTest.java | 23 import java.net.InetAddress; 57 InetSocketAddress theAddress = new InetSocketAddress(InetAddress 65 + (new InetSocketAddress(InetAddress.getLocalHost(), 68 new InetSocketAddress(InetAddress 76 InetSocketAddress clAddress = new InetSocketAddress(InetAddress 109 cs = new Socket(InetAddress.getLocalHost().getHostName(), port); 162 ServerSocket ss = new ServerSocket(0, 10, InetAddress.getLocalHost()); 164 new ServerSocket(ss.getLocalPort(), 10, InetAddress.getLocalHost()); 171 new ServerSocket(65536, 10, InetAddress.getLocalHost()); 337 protected void connect(InetAddress arg0, int arg1) throws IOException [all...] |
/prebuilts/jdk/jdk8/darwin-x86/sample/nio/multicast/ |
Reader.java | 61 static void parseAddessList(String s, List<InetAddress> list) 66 list.add(InetAddress.getByName(sources[i])); 80 List<InetAddress> includeList = new ArrayList<InetAddress>(); 81 List<InetAddress> excludeList = new ArrayList<InetAddress>(); 114 for (InetAddress source: excludeList) { 119 for (InetAddress source: includeList) {
|
/prebuilts/jdk/jdk8/linux-x86/sample/nio/multicast/ |
Reader.java | 61 static void parseAddessList(String s, List<InetAddress> list) 66 list.add(InetAddress.getByName(sources[i])); 80 List<InetAddress> includeList = new ArrayList<InetAddress>(); 81 List<InetAddress> excludeList = new ArrayList<InetAddress>(); 114 for (InetAddress source: excludeList) { 119 for (InetAddress source: includeList) {
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/ |
Inet6AddressTest.java | 23 import java.net.InetAddress; 35 InetAddress addr = null; 44 addr = InetAddress.getByName(addrName); 49 addr = InetAddress.getByName(addrName); 62 addr = InetAddress.getByName(addrName); 68 addr = InetAddress.getByName(addrName); 81 addr = InetAddress.getByName(addrName); 86 addr = InetAddress.getByName(addrName); 95 InetAddress addr = null; 99 addr = InetAddress.getByName(addrName) [all...] |
MulticastSocketTest.java | 25 import java.net.InetAddress; 44 private static InetAddress lookup(String s) { 46 return InetAddress.getByName(s); 56 private static InetAddress GOOD_IPv4 = lookup("224.0.0.3"); 57 private static InetAddress BAD_IPv4 = lookup("224.0.0.4"); 58 private static InetAddress GOOD_IPv6 = lookup("ff05::7:7"); 59 private static InetAddress BAD_IPv6 = lookup("ff05::7:8"); 70 loopbackInterface = NetworkInterface.getByInetAddress(InetAddress.getLoopbackAddress()); 90 Enumeration<InetAddress> addresses = nextInterface.getInetAddresses(); 92 final InetAddress nextAddress = addresses.nextElement() [all...] |
/libcore/luni/src/test/java/libcore/java/nio/channels/ |
ServerSocketChannelTest.java | 20 import java.net.InetAddress; 98 Enumeration<InetAddress> inetAddresses = nic.getInetAddresses(); 111 ssc.socket().bind(new InetSocketAddress(InetAddress.getLoopbackAddress(), 0)); 121 new InetSocketAddress(InetAddress.getLoopbackAddress(), boundAddress.getPort()); 129 Enumeration<InetAddress> inetAddresses = nic.getInetAddresses(); 144 ssc.bind(new InetSocketAddress(InetAddress.getLoopbackAddress(), 0)); 145 assertEquals(InetAddress.getLoopbackAddress(), 150 ssc.bind(new InetSocketAddress(InetAddress.getLoopbackAddress(),
|
/packages/apps/Email/tests/src/com/android/email/mail/transport/ |
SmtpSenderUnitTests.java | 35 import java.net.InetAddress; 257 mockTransport.setMockLocalAddress(InetAddress.getByName(LOCAL_ADDRESS));
|
/cts/tests/netlegacy22.api/src/android/net/cts/legacy/api22/ |
ConnectivityManagerLegacyTest.java | 36 import java.net.InetAddress; 83 byte[] addr = ((Inet4Address) InetAddress.getByName(addrString)).getAddress(); 91 private List<InetAddress> getIpAddresses(int type) { 92 ArrayList<InetAddress> addresses = new ArrayList<>(); 109 for (InetAddress address : getIpAddresses(type)) { 129 d.connect(InetAddress.getByName(addrString), 7); 130 InetAddress localAddress = d.getLocalAddress();
|
/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/internal/http/ |
RouteSelectorTest.java | 26 import java.net.InetAddress; 321 // InetAddress proxy specification. 322 socketAddress = new InetSocketAddress(InetAddress.getByName("localhost"), 1234); 325 InetAddress.getByAddress(new byte[] { 127, 0, 0, 1 }), 1234); 328 InetAddress.getByAddress("foobar", new byte[] { 127, 0, 0, 1 }), 1234); 332 private void assertRoute(Route route, Address address, Proxy proxy, InetAddress socketAddress, 351 private static List<InetAddress> makeFakeAddresses(int prefix, int count) { 353 List<InetAddress> result = new ArrayList<>(); 355 result.add(InetAddress.getByAddress(
|
/libcore/ojluni/src/main/java/java/net/ |
InetAddress.java | 57 * InetAddress consists of an IP address and possibly its 127 * <p> The InetAddress class provides methods to resolve host names to 130 * <h4> InetAddress Caching </h4> 132 * The InetAddress class has a cache to store successful as well as 175 * @see java.net.InetAddress#getByAddress(byte[]) 176 * @see java.net.InetAddress#getByAddress(java.lang.String, byte[]) 177 * @see java.net.InetAddress#getAllByName(java.lang.String) 178 * @see java.net.InetAddress#getByName(java.lang.String) 179 * @see java.net.InetAddress#getLocalHost() 183 class InetAddress implements java.io.Serializable [all...] |
AbstractPlainSocketImpl.java | 152 InetAddress address = InetAddress.getByName(host); 176 protected void connect(InetAddress address, int port) throws IOException { 226 private void connectToAddress(InetAddress address, int port, int timeout) throws IOException { 228 doConnect(InetAddress.getLocalHost(), port, timeout); 379 synchronized void doConnect(InetAddress address, int port, int timeout) throws IOException { 419 protected synchronized void bind(InetAddress address, int lport) 495 void setAddress(InetAddress address) { 766 abstract void socketConnect(InetAddress address, int port, int timeout) 768 abstract void socketBind(InetAddress address, int port [all...] |
Socket.java | 184 * {@link java.net.InetAddress#getByName InetAddress.getByName}{@code (null)}. 218 this(InetAddress.getAllByName(host), port, (SocketAddress) null, true); 248 public Socket(InetAddress address, int port) throws IOException { 260 * {@link java.net.InetAddress#getByName InetAddress.getByName}{@code (null)}. 289 public Socket(String host, int port, InetAddress localAddr, 292 this(InetAddress.getAllByName(host), port, 303 * (see {@link java.net.InetAddress#isAnyLocalAddress InetAddress.isAnyLocalAddress}{@code ()}) [all...] |
/external/sl4a/Common/src/com/googlecode/android_scripting/facade/net/nsd/ |
NsdManagerFacade.java | 33 import java.net.InetAddress; 124 nsi.setHost(InetAddress.getByName(j.getString(NSD_SERVICE_INFO_HOST)));
|
/frameworks/opt/net/ethernet/java/com/android/server/ethernet/ |
EthernetTracker.java | 44 import java.net.InetAddress; 379 ipConfig.gateway = InetAddress.parseNumericAddress(value); 382 ArrayList<InetAddress> dnsAddresses = new ArrayList<>(); 384 dnsAddresses.add(InetAddress.parseNumericAddress(address));
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/ |
SSLServerSocketTest.java | 24 import java.net.InetAddress; 57 public mySSLServerSocket(int port, int backlog, InetAddress address) throws IOException{ 170 * javax.net.ssl.SSLServerSocket#SSLServerSocket(int port, int backlog, InetAddress address) 173 // A null InetAddress is okay. 178 mySSLServerSocket ssl = new mySSLServerSocket(0, 0, InetAddress.getLocalHost()); 182 new mySSLServerSocket(port_invalid[i], 1, InetAddress.getLocalHost()); 189 new mySSLServerSocket(ssl.getLocalPort(), 0, InetAddress.getLocalHost());
|
SSLSocketTest.java | 21 import java.net.InetAddress; 59 * javax.net.ssl.SSLSocket#SSLSocket(InetAddress address, int port) 62 int sport = startServer("Cons InetAddress,I"); 65 SSLSocket ssl = getSSLSocket(InetAddress.getLocalHost(), sport); 71 getSSLSocket(InetAddress.getLocalHost(), sport + 1); 78 getSSLSocket(InetAddress.getLocalHost(), invalidPort[i]); 86 * javax.net.ssl.SSLSocket#SSLSocket(InetAddress address, int port, 87 * InetAddress clientAddress, int clientPort) 90 int sport = startServer("Cons InetAddress,I,InetAddress,I") [all...] |
/external/guava/guava-tests/test/com/google/common/net/ |
InetAddressesTest.java | 25 import java.net.InetAddress; 129 InetAddress ipv4Addr = null; 131 ipv4Addr = InetAddress.getByName(ipStr); 138 InetAddress ipv6Addr = null; 140 ipv6Addr = InetAddress.getByName(ipStr); 154 InetAddress ipv6Addr = null; 156 ipv6Addr = InetAddress.getByName(eightColons[i]); 168 InetAddress ipv6Addr = InetAddress.getByName(ipString); 222 InetAddress ip = InetAddresses.forString(ipStr) [all...] |