Home
last modified time | relevance | path

Searched refs:host (Results 1 – 25 of 99) sorted by relevance

1234

/libcore/ojluni/src/main/java/java/net/
DInetAddress.java280 public InetAddress[] lookupAllHostAddr(String host, int netId)
282 return impl.lookupAllHostAddr(host, netId);
652 String host = null; in getHostFromNameService() local
656 host = nameService.getHostByAddr(addr.getAddress()); in getHostFromNameService()
662 InetAddress[] arr = nameService.lookupAllHostAddr(host, NETID_UNSET); in getHostFromNameService()
673 host = addr.getHostAddress(); in getHostFromNameService()
674 return host; in getHostFromNameService()
677 host = addr.getHostAddress(); in getHostFromNameService()
680 return host; in getHostFromNameService()
1045 public static InetAddress getByAddress(String host, byte[] addr) throws UnknownHostException { in getByAddress() argument
[all …]
DURLStreamHandler.java127 String host = u.getHost(); in parseURL() local
190 host = authority = spec.substring(start, i); in parseURL()
197 host = null; in parseURL()
200 host = authority.substring(ind+1); in parseURL()
205 if (host != null) { in parseURL()
208 if (host.length()>0 && (host.charAt(0) == '[')) { in parseURL()
209 if ((ind = host.indexOf(']')) > 2) { in parseURL()
211 String nhost = host ; in parseURL()
212 host = nhost.substring(0,ind+1); in parseURL()
214 isIPv6LiteralAddress(host.substring(1, ind))) { in parseURL()
[all …]
DURL.java175 private String host; field in URL
313 public URL(String protocol, String host, int port, String file) in URL() argument
316 this(protocol, host, port, file, null); in URL()
337 public URL(String protocol, String host, String file) in URL() argument
339 this(protocol, host, -1, file); in URL()
381 public URL(String protocol, String host, int port, String file, in URL() argument
393 if (host != null) { in URL()
399 if (host.indexOf(':') >= 0 && !host.startsWith("[")) { in URL()
400 host = "["+host+"]"; in URL()
402 this.host = host; in URL()
[all …]
DInet6Address.java463 public static Inet6Address getByAddress(String host, byte[] addr, in getByAddress() argument
467 if (host != null && host.length() > 0 && host.charAt(0) == '[') { in getByAddress()
468 if (host.charAt(host.length()-1) == ']') { in getByAddress()
469 host = host.substring(1, host.length() -1); in getByAddress()
474 return new Inet6Address(host, addr, nif); in getByAddress()
496 public static Inet6Address getByAddress(String host, byte[] addr, in getByAddress() argument
500 if (host != null && host.length() > 0 && host.charAt(0) == '[') { in getByAddress()
501 if (host.charAt(host.length()-1) == ']') { in getByAddress()
502 host = host.substring(1, host.length() -1); in getByAddress()
507 return new Inet6Address(host, addr, scope_id); in getByAddress()
DInet6AddressImpl.java90 public InetAddress[] lookupAllHostAddr(String host, int netId) throws UnknownHostException { in lookupAllHostAddr() argument
91 if (host == null || host.isEmpty()) { in lookupAllHostAddr()
98 InetAddress result = InetAddressUtils.parseNumericAddressNoThrowStripOptionalBrackets(host); in lookupAllHostAddr()
103 return lookupHostByName(host, netId); in lookupAllHostAddr()
113 private static InetAddress[] lookupHostByName(String host, int netId) in lookupHostByName() argument
117 Object cachedResult = addressCache.get(host, netId); in lookupHostByName()
135 InetAddress[] addresses = Libcore.os.android_getaddrinfo(host, hints, netId); in lookupHostByName()
138 address.holder().hostName = host; in lookupHostByName()
139 address.holder().originalHostName = host; in lookupHostByName()
141 addressCache.put(host, netId, addresses); in lookupHostByName()
[all …]
DInMemoryCookieStore.java271 private boolean netscapeDomainMatches(String domain, String host) in netscapeDomainMatches() argument
273 if (domain == null || host == null) { in netscapeDomainMatches()
288 int firstDotInHost = host.indexOf('.'); in netscapeDomainMatches()
294 int lengthDiff = host.length() - domainLength; in netscapeDomainMatches()
297 return host.equalsIgnoreCase(domain); in netscapeDomainMatches()
300 String D = host.substring(lengthDiff); in netscapeDomainMatches()
314 host.equalsIgnoreCase(domain.substring(1))); in netscapeDomainMatches()
321 String host) { in getInternal1() argument
330 if ((c.getVersion() == 0 && netscapeDomainMatches(domain, host)) || in getInternal1()
331 (c.getVersion() == 1 && HttpCookie.domainMatches(domain, host))) { in getInternal1()
DURI.java482 private transient String host; // null ==> registry-based field in URI
661 String userInfo, String host, int port, in URI() argument
666 null, userInfo, host, port, in URI()
767 public URI(String scheme, String host, String path, String fragment) in URI() argument
770 this(scheme, null, host, -1, path, null, fragment); in URI()
908 if ((host != null) || (authority == null)) in parseServerAuthority()
1264 return host; in getHost()
1429 if (this.host != null) { in equals()
1432 if (!equalIgnoringCase(this.host, that.host)) return false; in equals()
1461 if (host != null) { in hashCode()
[all …]
DProtocolException.java48 public ProtocolException(String host) { in ProtocolException() argument
49 super(host); in ProtocolException()
/libcore/ojluni/src/main/java/sun/security/x509/
DURIName.java85 private String host; field in URIName
115 host = uri.getHost(); in URIName()
120 if (host != null) { in URIName()
121 if (host.charAt(0) == '[') { in URIName()
123 String ipV6Host = host.substring(1, host.length()-1); in URIName()
132 hostDNS = new DNSName(host); in URIName()
137 hostIP = new IPAddressName(host); in URIName()
165 String host = uri.getSchemeSpecificPart(); in nameConstraint() local
168 if (host.startsWith(".")) { in nameConstraint()
169 hostDNS = new DNSName(host.substring(1)); in nameConstraint()
[all …]
/libcore/ojluni/src/main/java/java/util/logging/
DSocketHandler.java85 private String host; field in SocketHandler
109 host = manager.getStringProperty(cname + ".host", null); in configure()
129 System.err.println("SocketHandler: connect failed to " + host + ":" + port); in SocketHandler()
150 public SocketHandler(String host, int port) throws IOException { in SocketHandler() argument
155 this.host = host; in SocketHandler()
164 if (host == null) { in connect()
165 throw new IllegalArgumentException("Null host name: " + host); in connect()
174 sock = new Socket(host, port); in connect()
/libcore/ojluni/src/main/java/sun/net/www/protocol/file/
DHandler.java46 String host = url.getHost(); in getHost() local
47 if (host == null) in getHost()
48 host = ""; in getHost()
49 return host; in getHost()
77 String host = u.getHost(); in openConnection() local
78 if (host == null || host.equals("") || host.equals("~") || in openConnection()
79 host.equalsIgnoreCase("localhost")) { in openConnection()
91 ru = new URL("ftp", host, u.getFile() + in openConnection()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/
DSSLEngineTest.java98 String host = "new host"; in test_ConstructorLjava_lang_StringI02() local
100 SSLEngine e = getEngine(host, port); in test_ConstructorLjava_lang_StringI02()
101 assertEquals(e.getPeerHost(), host); in test_ConstructorLjava_lang_StringI02() local
112 String host = "new host"; in test_ConstructorLjava_lang_StringI03() local
114 SSLEngine e = getRawEngine(host, port); in test_ConstructorLjava_lang_StringI03()
115 assertEquals(e.getPeerHost(), host); in test_ConstructorLjava_lang_StringI03() local
340 String host = "new host"; in test_unwrap_02() local
345 SSLEngine sse = getEngine(host, port); in test_unwrap_02()
376 String host = "new host"; in test_unwrap_03() local
382 SSLEngine sse = getEngine(host, port); in test_unwrap_03()
[all …]
/libcore/support/src/test/java/libcore/javax/net/ssl/
DFakeSSLSession.java25 final String host; field in FakeSSLSession
27 public FakeSSLSession(String host) { in FakeSSLSession() argument
28 this.host = host; in FakeSSLSession()
44 return host.getBytes(); in getId()
72 return host; in getPeerHost()
DTestSSLContext.java99 public final InetAddress host; field in TestSSLContext
214 InetAddress host, in TestSSLContext() argument
227 this.host = host; in TestSSLContext()
294 InetAddress host = InetAddress.getLocalHost(); in create() local
304 serverSocket, host, port); in create()
391 public Socket createSocket(String host, int port) in clientAuth() argument
393 return set(sf.createSocket(host, port)); in clientAuth()
395 public Socket createSocket(String host, int port, InetAddress localHost, int localPort) in clientAuth() argument
397 return set(sf.createSocket(host, port, localHost, localPort)); in clientAuth()
399 public Socket createSocket(InetAddress host, int port) throws IOException { in clientAuth() argument
[all …]
/libcore/ojluni/src/main/java/javax/net/
DSocketFactory.java163 public abstract Socket createSocket(String host, int port) in createSocket() argument
195 createSocket(String host, int port, InetAddress localHost, int localPort) in createSocket() argument
221 public abstract Socket createSocket(InetAddress host, int port) in createSocket() argument
276 public Socket createSocket(String host, int port) in createSocket() argument
279 return new Socket(host, port); in createSocket()
288 public Socket createSocket(String host, int port, in createSocket() argument
292 return new Socket(host, port, clientAddress, clientPort); in createSocket()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/
DInetSocketAddressTest.java50 legalHostPortPairs[i].host, legalHostPortPairs[i].port); in test_createUnresolvedLjava_lang_StringI()
53 assertEquals(isa.getHostName(), legalHostPortPairs[i].host); in test_createUnresolvedLjava_lang_StringI()
67 illegalHostPortPairs[i].host, in test_createUnresolvedLjava_lang_StringI_IllegalArgumentException()
70 + illegalHostPortPairs[i].host + ",port = " in test_createUnresolvedLjava_lang_StringI_IllegalArgumentException()
82 String host; field in InetSocketAddressTest.HostPortPair
86 public HostPortPair(String host, int port) { in HostPortPair() argument
87 this.host = host; in HostPortPair()
/libcore/ojluni/src/main/java/sun/net/util/
DURLUtil.java55 String host = url.getHost(); in urlNoFragString() local
56 if (host != null) { in urlNoFragString()
58 host = host.toLowerCase(); in urlNoFragString()
59 strForm.append(host); in urlNoFragString()
/libcore/luni/src/test/java/libcore/java/net/
DDelegatingSocketFactory.java52 public Socket createSocket(String host, int port) throws IOException { in createSocket() argument
53 Socket socket = mDelegate.createSocket(host, port); in createSocket()
58 public Socket createSocket(String host, int port, InetAddress localHost, int localPort) in createSocket() argument
60 Socket socket = mDelegate.createSocket(host, port, localHost, localPort); in createSocket()
65 public Socket createSocket(InetAddress host, int port) throws IOException { in createSocket() argument
66 Socket socket = mDelegate.createSocket(host, port); in createSocket()
DSocketTest.java111 InetAddress host = InetAddress.getLocalHost(); in checkSocketLocalAndRemoteAddresses() local
115 InetSocketAddress listenAddr = new InetSocketAddress(host, 0); in checkSocketLocalAndRemoteAddresses()
125 InetSocketAddress addr = new InetSocketAddress(host, ssc.socket().getLocalPort()); in checkSocketLocalAndRemoteAddresses()
541 public SocketThatFailOnClose(String host, int port)
543 super(host, port);
548 public SocketThatFailOnClose(String host, int port, InetAddress localAddr,
550 super(host, port, localAddr, localPort);
556 public SocketThatFailOnClose(String host, int port, boolean stream) throws IOException {
557 super(host, port, stream);
559 public SocketThatFailOnClose(InetAddress host, int port, boolean stream)
[all …]
/libcore/
DCleanSpec.mk51 $(call add-clean-step, rm -rf $(OUT_DIR)/host/common/obj/JAVA_LIBRARIES/core*)
54 $(call add-clean-step, rm -rf $(OUT_DIR)/host/common/obj/JAVA_LIBRARIES/core*)
56 $(call add-clean-step, rm -rf $(OUT_DIR)/host/common/obj/JAVA_LIBRARIES/core*)
59 $(call add-clean-step, rm -rf $(OUT_DIR)/host/linux-x86/framework/*core-simple*)
60 $(call add-clean-step, rm -rf $(OUT_DIR)/host/linux-x86/framework/*/*core-simple*)
64 $(call add-clean-step, touch -c $(OUT_DIR)/host/linux-x86/bin/dex2oat)
65 $(call add-clean-step, touch -c $(OUT_DIR)/host/linux-x86/bin/dex2oatd)
/libcore/ojluni/src/main/java/sun/misc/
DFileURLMapper.java61 String host = url.getHost(); in getPath() local
62 if (host == null || "".equals(host) || "localhost".equalsIgnoreCase (host)) { in getPath()
/libcore/luni/src/test/java/libcore/javax/net/ssl/
DFakeSSLSocketFactory.java40 public Socket createSocket(Socket s, String host, int port, boolean autoClose) { in createSocket() argument
51 public Socket createSocket(InetAddress host, int port) { in createSocket() argument
56 public Socket createSocket(String host, int port, InetAddress localHost, int localPort) { in createSocket() argument
61 public Socket createSocket(String host, int port) { in createSocket() argument
/libcore/benchmarks/src/benchmarks/regression/
DSSLSocketBenchmark.java43 final InetAddress host; field in SSLSocketBenchmark.WebSite
50 this.host = InetAddress.getByName(url.getHost()); in WebSite()
63 + "Host: " + host + portString + "\r\n" in WebSite()
83 Socket s = sf.createSocket(webSite.host, webSite.port); in time()
/libcore/ojluni/annotations/sdk/nullability/java/net/
DInetAddress.annotated.java73 …java.net.InetAddress getByAddress(@libcore.util.Nullable java.lang.String host, byte[] addr) throw… in getByAddress() argument
75 …ic java.net.InetAddress getByName(@libcore.util.Nullable java.lang.String host) throws java.net.Un… in getByName() argument
77 public static java.net.InetAddress[] getAllByName(@libcore.util.Nullable java.lang.String host) thr… in getAllByName() argument
85 …va.net.InetAddress getByNameOnNet(@libcore.util.Nullable java.lang.String host, int netId) throws … in getByNameOnNet() argument
87 …t.InetAddress[] getAllByNameOnNet(@libcore.util.Nullable java.lang.String host, int netId) throws … in getAllByNameOnNet() argument
/libcore/ojluni/src/main/java/javax/net/ssl/
DSSLSocket.java929 protected SSLSocket(String host, int port) in SSLSocket() argument
931 { super(host, port); } in SSLSocket()
985 protected SSLSocket(String host, int port, in SSLSocket() argument
988 { super(host, port, clientAddress, clientPort); } in SSLSocket()

1234