/libcore/luni/src/test/java/libcore/java/net/ |
D | URITest.java | 27 URI uri = new URI("http://username:password@host:8080/directory/file?query#ref"); in testUriParts() local 28 assertEquals("http", uri.getScheme()); in testUriParts() 29 assertEquals("username:password@host:8080", uri.getAuthority()); in testUriParts() 30 assertEquals("username:password@host:8080", uri.getRawAuthority()); in testUriParts() 31 assertEquals("username:password", uri.getUserInfo()); in testUriParts() 32 assertEquals("username:password", uri.getRawUserInfo()); in testUriParts() 33 assertEquals("host", uri.getHost()); in testUriParts() 34 assertEquals(8080, uri.getPort()); in testUriParts() 35 assertEquals("/directory/file", uri.getPath()); in testUriParts() 36 assertEquals("/directory/file", uri.getRawPath()); in testUriParts() [all …]
|
D | OldAndroidURITest.java | 32 URI uri = new URI(str); in construct() local 33 assertEquals(host, uri.getHost()); in construct() 34 assertEquals(path, uri.getPath()); in construct() 35 assertEquals(absolute, uri.isAbsolute()); in construct() 44 private static void resolve(String base, String uri, String expected) { in resolve() argument 46 URI resolved = b.resolve(uri); in resolve()
|
/libcore/luni/src/main/java/java/net/ |
D | URI.java | 214 StringBuilder uri = new StringBuilder(); in URI() local 216 uri.append(scheme); in URI() 217 uri.append(':'); in URI() 220 ALL_LEGAL_ENCODER.appendEncoded(uri, schemeSpecificPart); in URI() 223 uri.append('#'); in URI() 224 ALL_LEGAL_ENCODER.appendEncoded(uri, fragment); in URI() 227 parseURI(uri.toString(), false); in URI() 247 StringBuilder uri = new StringBuilder(); in URI() local 249 uri.append(scheme); in URI() 250 uri.append(':'); in URI() [all …]
|
D | CookieStoreImpl.java | 34 public synchronized void add(URI uri, HttpCookie cookie) { in add() argument 39 uri = cookiesUri(uri); in add() 40 List<HttpCookie> cookies = map.get(uri); in add() 43 map.put(uri, cookies); in add() 50 private URI cookiesUri(URI uri) { in cookiesUri() argument 51 if (uri == null) { in cookiesUri() 55 return new URI("http", uri.getHost(), null, null); in cookiesUri() 57 return uri; // probably a URI with no host in cookiesUri() 61 public synchronized List<HttpCookie> get(URI uri) { in get() argument 62 if (uri == null) { in get() [all …]
|
D | CookieManager.java | 105 public Map<String, List<String>> get(URI uri, in get() argument 107 if (uri == null || requestHeaders == null) { in get() 112 for (HttpCookie cookie : store.get(uri)) { in get() 113 if (HttpCookie.pathMatches(cookie, uri) in get() 114 && HttpCookie.secureMatches(cookie, uri) in get() 115 && HttpCookie.portMatches(cookie, uri)) { in get() 158 public void put(URI uri, Map<String, List<String>> responseHeaders) throws IOException { in put() argument 159 if (uri == null || responseHeaders == null) { in put() 169 cookie.setDomain(uri.getHost()); in put() 174 cookie.setPath(pathToCookiePath(uri.getPath())); in put() [all …]
|
D | CookiePolicy.java | 34 public boolean shouldAccept(URI uri, HttpCookie cookie) { 43 public boolean shouldAccept(URI uri, HttpCookie cookie) { 52 public boolean shouldAccept(URI uri, HttpCookie cookie) { 53 return HttpCookie.domainMatches(cookie.getDomain(), uri.getHost()); 67 boolean shouldAccept(URI uri, HttpCookie cookie); in shouldAccept() argument
|
D | ProxySelectorImpl.java | 25 @Override public void connectFailed(URI uri, SocketAddress sa, IOException ioe) { in connectFailed() argument 26 if (uri == null || sa == null || ioe == null) { in connectFailed() 31 @Override public List<Proxy> select(URI uri) { in select() argument 32 return Collections.singletonList(selectOneProxy(uri)); in select() 35 private Proxy selectOneProxy(URI uri) { in selectOneProxy() argument 36 if (uri == null) { in selectOneProxy() 39 String scheme = uri.getScheme(); in selectOneProxy() 67 && isNonProxyHost(uri.getHost(), System.getProperty(nonProxyHostsKey))) { in selectOneProxy()
|
D | CookieStore.java | 50 void add(URI uri, HttpCookie cookie); in add() argument 64 List<HttpCookie> get(URI uri); in get() argument 95 boolean remove(URI uri, HttpCookie cookie); in remove() argument
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/ |
D | URITest.java | 231 URI uri = new URI("http://host:-8096/path/index.html"); in test_ConstructorLjava_lang_String() local 232 assertEquals("Assert 2: returned wrong port value,", -1, uri.getPort()); in test_ConstructorLjava_lang_String() 233 assertNull("Assert 3: returned wrong host value,", uri.getHost()); in test_ConstructorLjava_lang_String() 235 uri.parseServerAuthority(); in test_ConstructorLjava_lang_String() 241 uri = new URI("http", "//myhost:-8096", null); in test_ConstructorLjava_lang_String() 242 assertEquals("Assert 5: returned wrong port value,", -1, uri.getPort()); in test_ConstructorLjava_lang_String() 243 assertNull("Assert 6: returned wrong host value,", uri.getHost()); in test_ConstructorLjava_lang_String() 245 uri.parseServerAuthority(); in test_ConstructorLjava_lang_String() 265 URI uri = new URI("path[one"); in test_URI_String() local 273 URI uri = new URI(" "); in test_URI_String() local [all …]
|
D | CookieManagerTest.java | 35 private static void checkValidParams4Get(URI uri, in checkValidParams4Get() argument 39 manager.get(uri, map); in checkValidParams4Get() 47 private static void checkValidParams4Put(URI uri, in checkValidParams4Put() argument 51 manager.put(uri, map); in checkValidParams4Put() 99 URI uri = new URI(cookies[i][j]); in store() local 100 manager.put(uri, responseHeaders); in store() 231 public void add(URI uri, HttpCookie cookie) { in testCookieManager_LCookieStore_LCookiePolicy() argument 235 public List<HttpCookie> get(URI uri) { in testCookieManager_LCookieStore_LCookiePolicy() argument 247 public boolean remove(URI uri, HttpCookie cookie) { in testCookieManager_LCookieStore_LCookiePolicy() argument 274 URI uri = new URI("http://a.b.c"); in test_SetCookiePolicy_LCookiePolicy() local [all …]
|
D | CookiePolicyTest.java | 35 URI uri = new URI(""); in test_ShouldAccept_LURI_LHttpCookie() local 44 CookiePolicy.ACCEPT_ORIGINAL_SERVER.shouldAccept(uri, null); in test_ShouldAccept_LURI_LHttpCookie() 64 accept = CookiePolicy.ACCEPT_ALL.shouldAccept(uri, null); in test_ShouldAccept_LURI_LHttpCookie() 74 accept = CookiePolicy.ACCEPT_NONE.shouldAccept(uri, null); in test_ShouldAccept_LURI_LHttpCookie() 78 accept = CookiePolicy.ACCEPT_ORIGINAL_SERVER.shouldAccept(uri, cookie); in test_ShouldAccept_LURI_LHttpCookie()
|
/libcore/luni/src/main/java/javax/xml/xpath/ |
D | XPathFactory.java | 133 public static final XPathFactory newInstance(final String uri) in newInstance() argument 135 if (uri == null) { in newInstance() 138 if (uri.length() == 0) { in newInstance() 148 XPathFactory xpathFactory = new XPathFactoryFinder(classLoader).newFactory(uri); in newInstance() 152 + uri in newInstance() 165 public static XPathFactory newInstance(String uri, String factoryClassName, in newInstance() argument 167 if (uri == null) { in newInstance() 170 if (uri.length() == 0) { in newInstance() 182 if (xpathFactory == null || !xpathFactory.isObjectModelSupported(uri)) { in newInstance() 185 + uri in newInstance()
|
D | XPathFactoryFinder.java | 128 public XPathFactory newFactory(String uri) { in newFactory() argument 129 if (uri == null) { in newFactory() 132 XPathFactory f = _newFactory(uri); in newFactory() 135 debugPrintln("factory '" + f.getClass().getName() + "' was found for " + uri); in newFactory() 137 debugPrintln("unable to find a factory for " + uri); in newFactory() 148 private XPathFactory _newFactory(String uri) { in _newFactory() argument 150 String propertyName = SERVICE_CLASS.getName() + ":" + uri; in _newFactory() 206 xpf = loadFromServicesFile(uri, resource.toExternalForm(), resource.openStream()); in _newFactory() 217 if(uri.equals(XPathFactory.DEFAULT_OBJECT_MODEL_URI)) { in _newFactory() 269 private XPathFactory loadFromServicesFile(String uri, String resourceName, InputStream in) { in loadFromServicesFile() argument [all …]
|
/libcore/luni/src/main/java/org/apache/harmony/xml/ |
D | ExpatAttributes.java | 77 public int getIndex(String uri, String localName) { in getIndex() argument 78 if (uri == null) { in getIndex() 88 return getIndex(pointer, uri, localName); in getIndex() 102 public String getType(String uri, String localName) { in getType() argument 103 if (uri == null) { in getType() 109 return getIndex(uri, localName) == -1 ? null : CDATA; in getType() 116 public String getValue(String uri, String localName) { in getValue() argument 117 if (uri == null) { in getValue() 127 return getValue(pointer, uri, localName); in getValue() 145 private static native int getIndex(long attributePointer, String uri, String localName); in getIndex() argument [all …]
|
/libcore/luni/src/main/java/org/xml/sax/helpers/ |
D | NamespaceSupport.java | 292 public boolean declarePrefix (String prefix, String uri) in declarePrefix() argument 297 currentContext.declarePrefix(prefix, uri); in declarePrefix() 415 public String getPrefix (String uri) in getPrefix() argument 417 return currentContext.getPrefix(uri); in getPrefix() 444 public Enumeration getPrefixes(String uri) { in getPrefixes() argument 449 if (uri.equals(getURI(prefix))) { in getPrefixes() 597 void declarePrefix(String prefix, String uri) { in declarePrefix() argument 610 uri = uri.intern(); in declarePrefix() 612 if ("".equals(uri)) { in declarePrefix() 615 defaultNS = uri; in declarePrefix() [all …]
|
D | AttributesImpl.java | 199 public int getIndex (String uri, String localName) in getIndex() argument 203 if (data[i].equals(uri) && data[i+1].equals(localName)) { in getIndex() 240 public String getType (String uri, String localName) in getType() argument 244 if (data[i].equals(uri) && data[i+1].equals(localName)) { in getType() 282 public String getValue (String uri, String localName) in getValue() argument 286 if (data[i].equals(uri) && data[i+1].equals(localName)) { in getValue() 379 public void addAttribute (String uri, String localName, String qName, in addAttribute() argument 383 data[length*5] = uri; in addAttribute() 413 public void setAttribute (int index, String uri, String localName, in setAttribute() argument 417 data[index*5] = uri; in setAttribute() [all …]
|
/libcore/luni/src/test/java/libcore/xml/ |
D | SaxTest.java | 40 @Override public void startElement(String uri, String localName, in testNoPrefixesNoNamespaces() 42 assertEquals("", uri); in testNoPrefixesNoNamespaces() 53 @Override public void startElement(String uri, String localName, in testNoPrefixesNoNamespaces() 55 assertEquals("", uri); in testNoPrefixesNoNamespaces() 68 @Override public void startElement(String uri, String localName, in testNoPrefixesYesNamespaces() 70 assertEquals("", uri); in testNoPrefixesYesNamespaces() 81 @Override public void startElement(String uri, String localName, in testNoPrefixesYesNamespaces() 83 assertEquals("http://quux", uri); in testNoPrefixesYesNamespaces() 100 @Override public void startElement(String uri, String localName, in testYesPrefixesYesNamespaces() 102 assertEquals("", uri); in testYesPrefixesYesNamespaces() [all …]
|
/libcore/luni/src/main/java/org/xml/sax/ext/ |
D | Attributes2Impl.java | 95 public boolean isDeclared (String uri, String localName) in isDeclared() argument 97 int index = getIndex (uri, localName); in isDeclared() 102 + ", namespace=" + uri); in isDeclared() 149 public boolean isSpecified (String uri, String localName) in isSpecified() argument 151 int index = getIndex (uri, localName); in isSpecified() 156 + ", namespace=" + uri); in isSpecified() 240 public void addAttribute (String uri, String localName, String qName, in addAttribute() argument 243 super.addAttribute (uri, localName, qName, type, value); in addAttribute()
|
/libcore/luni/src/main/java/libcore/net/ |
D | UriCodec.java | 42 public final String validate(String uri, int start, int end, String name) in validate() argument 45 char ch = uri.charAt(i); in validate() 53 throw new URISyntaxException(uri, "Incomplete % sequence in " + name, i); in validate() 55 int d1 = hexToInt(uri.charAt(i + 1)); in validate() 56 int d2 = hexToInt(uri.charAt(i + 2)); in validate() 58 throw new URISyntaxException(uri, "Invalid % sequence: " in validate() 59 + uri.substring(i, i + 3) + " in " + name, i); in validate() 63 throw new URISyntaxException(uri, "Illegal character in " + name, i); in validate() 66 return uri.substring(start, end); in validate()
|
/libcore/luni/src/test/java/tests/org/w3c/dom/ |
D | DOMTestCase.java | 109 String uri = actual; in assertURIEquals() local 117 uri = actual.substring(0, lastPound); in assertURIEquals() 124 int lastQuestion = uri.lastIndexOf("?"); in assertURIEquals() 130 uri = actual.substring(0, lastQuestion); in assertURIEquals() 137 int firstColon = uri.indexOf(":"); in assertURIEquals() 138 int firstSlash = uri.indexOf("/"); in assertURIEquals() 139 String actualPath = uri; in assertURIEquals() 142 actualScheme = uri.substring(0, firstColon); in assertURIEquals() 143 actualPath = uri.substring(firstColon + 1); in assertURIEquals()
|
/libcore/luni/src/main/java/org/xml/sax/ |
D | Attributes.java | 184 public int getIndex (String uri, String localName); in getIndex() argument 210 public abstract String getType (String uri, String localName); in getType() argument 239 public abstract String getValue (String uri, String localName); in getValue() argument
|
D | ContentHandler.java | 169 public void startPrefixMapping (String prefix, String uri) in startPrefixMapping() argument 257 public void startElement (String uri, String localName, in startElement() argument 283 public void endElement (String uri, String localName, in endElement() argument
|
/libcore/luni/src/main/java/org/apache/harmony/security/x509/ |
D | GeneralName.java | 369 String uri = (String) name; in isAcceptable() local 370 int begin = uri.indexOf("://")+3; in isAcceptable() 371 int end = uri.indexOf('/', begin); in isAcceptable() 373 ? uri.substring(begin) in isAcceptable() 374 : uri.substring(begin, end); in isAcceptable() 375 uri = (String) gname.getName(); in isAcceptable() 376 begin = uri.indexOf("://")+3; in isAcceptable() 377 end = uri.indexOf('/', begin); in isAcceptable() 379 ? uri.substring(begin) in isAcceptable() 380 : uri.substring(begin, end); in isAcceptable() [all …]
|
/libcore/dom/src/test/java/org/w3c/domts/ |
D | DOMLocatorImpl.java | 28 private final String uri; field in DOMLocatorImpl 36 this.uri = src.getUri(); in DOMLocatorImpl() 81 return uri; in getUri()
|
/libcore/luni/src/main/java/java/io/ |
D | File.java | 175 public File(URI uri) { in File() argument 177 checkURI(uri); in File() 178 this.path = fixSlashes(uri.getPath()); in File() 218 private static void checkURI(URI uri) { in checkURI() argument 219 if (!uri.isAbsolute()) { in checkURI() 220 throw new IllegalArgumentException("URI is not absolute: " + uri); in checkURI() 221 } else if (!uri.getRawSchemeSpecificPart().startsWith("/")) { in checkURI() 222 throw new IllegalArgumentException("URI is not hierarchical: " + uri); in checkURI() 224 if (!"file".equals(uri.getScheme())) { in checkURI() 225 throw new IllegalArgumentException("Expected file scheme in URI: " + uri); in checkURI() [all …]
|