/external/apache-commons-io/src/main/java/org/apache/commons/io/ |
D | CloseableURLConnection.java | 43 private final URLConnection urlConnection; field in CloseableURLConnection 45 CloseableURLConnection(final URLConnection urlConnection) { in CloseableURLConnection() argument 46 super(Objects.requireNonNull(urlConnection, "urlConnection").getURL()); in CloseableURLConnection() 47 this.urlConnection = urlConnection; in CloseableURLConnection() 52 urlConnection.addRequestProperty(key, value); in addRequestProperty() 57 IOUtils.close(urlConnection); in close() 62 urlConnection.connect(); in connect() 67 return urlConnection.equals(obj); in equals() 72 return urlConnection.getAllowUserInteraction(); in getAllowUserInteraction() 77 return urlConnection.getConnectTimeout(); in getConnectTimeout() [all …]
|
/external/downloader/src/main/java/com/google/android/downloader/ |
D | PlatformUrlEngine.java | 123 URLConnection urlConnection = null; in send() local 126 urlConnection = url.openConnection(); in send() 127 urlConnection.setConnectTimeout(connectTimeoutsMs); in send() 128 urlConnection.setReadTimeout(readTimeoutsMs); in send() 132 urlConnection.addRequestProperty(key, value); in send() 138 urlConnection.connect(); in send() 142 int httpResponseCode = getResponseCode(urlConnection); in send() 149 new PlatformUrlResponse(urlConnection, httpResponseCode); in send() 150 urlConnection = null; in send() 157 maybeDisconnect(urlConnection); in send() [all …]
|
/external/cronet/components/cronet/android/test/javatests/src/org/chromium/net/urlconnection/ |
D | CronetHttpURLConnectionTest.java | 97 HttpURLConnection urlConnection = in testBasicGet() local 99 assertEquals(200, urlConnection.getResponseCode()); in testBasicGet() 100 assertEquals("OK", urlConnection.getResponseMessage()); in testBasicGet() 101 assertEquals("GET", TestUtil.getResponseAsString(urlConnection)); in testBasicGet() 102 urlConnection.disconnect(); in testBasicGet() 268 HttpURLConnection urlConnection = in testNotFoundURLRequest() local 270 assertEquals(404, urlConnection.getResponseCode()); in testNotFoundURLRequest() 271 assertEquals("Not Found", urlConnection.getResponseMessage()); in testNotFoundURLRequest() 273 urlConnection.getInputStream(); in testNotFoundURLRequest() 278 InputStream errorStream = urlConnection.getErrorStream(); in testNotFoundURLRequest() [all …]
|
/external/glide/library/src/main/java/com/bumptech/glide/load/data/ |
D | HttpUrlFetcher.java | 24 private HttpURLConnection urlConnection; field in HttpUrlFetcher 57 urlConnection = connectionFactory.build(url); in loadDataWithRedirects() 58 urlConnection.setConnectTimeout(2500); in loadDataWithRedirects() 59 urlConnection.setReadTimeout(2500); in loadDataWithRedirects() 60 urlConnection.setUseCaches(false); in loadDataWithRedirects() 61 urlConnection.setDoInput(true); in loadDataWithRedirects() 64 urlConnection.connect(); in loadDataWithRedirects() 68 final int statusCode = urlConnection.getResponseCode(); in loadDataWithRedirects() 70 stream = urlConnection.getInputStream(); in loadDataWithRedirects() 73 String redirectUrlString = urlConnection.getHeaderField("Location"); in loadDataWithRedirects() [all …]
|
/external/sl4a/Common/src/com/googlecode/android_scripting/facade/wifi/ |
D | HttpFacade.java | 107 HttpURLConnection urlConnection; in httpRequest() local 109 urlConnection = (HttpURLConnection) targetURL.openConnection(); in httpRequest() 110 urlConnection.setConnectTimeout(9000); in httpRequest() 111 urlConnection.setReadTimeout(timeout); in httpRequest() 112 urlConnection.connect(); in httpRequest() 113 int respCode = urlConnection.getResponseCode(); in httpRequest() 114 String respMsg = urlConnection.getResponseMessage(); in httpRequest() 121 return urlConnection; in httpRequest() 141 HttpURLConnection urlConnection = httpRequest(url, null); in httpDownloadFile() local 162 String contentDisposition = urlConnection.getHeaderField("Content-Disposition"); in httpDownloadFile() [all …]
|
/external/walt/android/WALT/app/src/main/java/org/chromium/latency/walt/ |
D | LogUploader.java | 52 HttpURLConnection urlConnection = in loadInBackground() local 54 urlConnection.setRequestMethod("POST"); in loadInBackground() 55 urlConnection.setDoOutput(true); in loadInBackground() 56 urlConnection.setRequestProperty("Content-Type", "text/plain"); in loadInBackground() 58 new BufferedOutputStream(urlConnection.getOutputStream()); in loadInBackground() 62 final int responseCode = urlConnection.getResponseCode(); in loadInBackground()
|
/external/okhttp/okhttp-android-support/src/main/java/com/squareup/okhttp/internal/huc/ |
D | JavaApiConverter.java | 68 public static Response createOkResponseForCachePut(URI uri, URLConnection urlConnection) in createOkResponseForCachePut() argument 71 HttpURLConnection httpUrlConnection = (HttpURLConnection) urlConnection; in createOkResponseForCachePut() 76 Headers responseHeaders = createHeaders(urlConnection.getHeaderFields()); in createOkResponseForCachePut() 78 Headers varyHeaders = varyHeaders(urlConnection, responseHeaders); in createOkResponseForCachePut() 111 ResponseBody okBody = createOkBody(urlConnection); in createOkResponseForCachePut() 154 private static Headers varyHeaders(URLConnection urlConnection, Headers responseHeaders) { in varyHeaders() argument 168 if (!(urlConnection instanceof CacheHttpURLConnection in varyHeaders() 169 || urlConnection instanceof CacheHttpsURLConnection)) { in varyHeaders() 175 Map<String, List<String>> requestProperties = urlConnection.getRequestProperties(); in varyHeaders() 500 private static ResponseBody createOkBody(final URLConnection urlConnection) { [all …]
|
/external/okhttp/repackaged/okhttp-android-support/src/main/java/com/android/okhttp/internal/huc/ |
D | JavaApiConverter.java | 70 public static Response createOkResponseForCachePut(URI uri, URLConnection urlConnection) in createOkResponseForCachePut() argument 73 HttpURLConnection httpUrlConnection = (HttpURLConnection) urlConnection; in createOkResponseForCachePut() 78 Headers responseHeaders = createHeaders(urlConnection.getHeaderFields()); in createOkResponseForCachePut() 80 Headers varyHeaders = varyHeaders(urlConnection, responseHeaders); in createOkResponseForCachePut() 113 ResponseBody okBody = createOkBody(urlConnection); in createOkResponseForCachePut() 156 private static Headers varyHeaders(URLConnection urlConnection, Headers responseHeaders) { in varyHeaders() argument 170 if (!(urlConnection instanceof CacheHttpURLConnection in varyHeaders() 171 || urlConnection instanceof CacheHttpsURLConnection)) { in varyHeaders() 177 Map<String, List<String>> requestProperties = urlConnection.getRequestProperties(); in varyHeaders() 502 private static ResponseBody createOkBody(final URLConnection urlConnection) { [all …]
|
/external/okhttp/benchmarks/src/main/java/com/squareup/okhttp/benchmarks/ |
D | UrlConnection.java | 63 HttpURLConnection urlConnection = (HttpURLConnection) url.url().openConnection(); in run() local 64 InputStream in = urlConnection.getInputStream(); in run() 65 if ("gzip".equals(urlConnection.getHeaderField("Content-Encoding"))) { in run()
|
D | OkHttp.java | 67 HttpURLConnection urlConnection = new OkUrlFactory(client).open(url.url()); in run() local 68 long total = readAllAndClose(urlConnection.getInputStream()); in run()
|
/external/auto/value/src/main/java/com/google/auto/value/processor/ |
D | SimpleServiceLoader.java | 89 URLConnection urlConnection = resourceUrl.openConnection(); in providerClassesFromUrl() local 90 urlConnection.setUseCaches(false); in providerClassesFromUrl() 92 try (InputStream in = urlConnection.getInputStream(); in providerClassesFromUrl()
|
/external/okhttp/okhttp-android-support/src/test/java/com/squareup/okhttp/internal/huc/ |
D | ResponseCacheTest.java | 239 HttpURLConnection urlConnection = openConnection(server.getUrl("/")); in testResponseCaching() local 240 InputStream in = urlConnection.getInputStream(); in testResponseCaching() 241 assertEquals("I love ", readAscii(urlConnection, "I love ".length())); in testResponseCaching() 243 assertEquals("spiders", readAscii(urlConnection, "spiders".length())); in testResponseCaching() 247 urlConnection = openConnection(server.getUrl("/")); // cached! in testResponseCaching() 248 in = urlConnection.getInputStream(); in testResponseCaching() 250 readAscii(urlConnection, "I love puppies but hate spiders".length())); in testResponseCaching() 251 assertEquals(200, urlConnection.getResponseCode()); in testResponseCaching() 252 assertEquals("Fantastic", urlConnection.getResponseMessage()); in testResponseCaching() 2017 URLConnection urlConnection = openConnection(url); [all …]
|
/external/okhttp/okhttp-android-support/src/main/java/com/squareup/okhttp/ |
D | AndroidShimResponseCache.java | 68 @Override public CacheRequest put(URI uri, URLConnection urlConnection) throws IOException { in put() argument 69 Response okResponse = JavaApiConverter.createOkResponseForCachePut(uri, urlConnection); in put()
|
/external/okhttp/repackaged/okhttp-android-support/src/main/java/com/android/okhttp/ |
D | AndroidShimResponseCache.java | 70 @Override public CacheRequest put(URI uri, URLConnection urlConnection) throws IOException { in put() argument 71 Response okResponse = JavaApiConverter.createOkResponseForCachePut(uri, urlConnection); in put()
|
/external/okhttp/okhttp-android-support/src/test/java/com/squareup/okhttp/android/ |
D | HttpResponseCache.java | 101 @Override public CacheRequest put(URI uri, URLConnection urlConnection) throws IOException { in put() argument 102 return shimResponseCache.put(uri, urlConnection); in put()
|
/external/mockwebserver/src/test/java/com/google/mockwebserver/ |
D | MockWebServerTest.java | 190 URLConnection urlConnection = server.getUrl("/").openConnection(); in testResponseTimeout() local 191 urlConnection.setReadTimeout(1000); in testResponseTimeout() 192 InputStream in = urlConnection.getInputStream(); in testResponseTimeout()
|
/external/apache-commons-io/src/main/java/org/apache/commons/io/input/ |
D | XmlStreamReader.java | 572 …public XmlStreamReader(final URLConnection urlConnection, final String defaultEncoding) throws IOE… in XmlStreamReader() argument 573 Objects.requireNonNull(urlConnection, "urlConnection"); in XmlStreamReader() 576 final String contentType = urlConnection.getContentType(); in XmlStreamReader() 577 final InputStream inputStream = urlConnection.getInputStream(); in XmlStreamReader() 581 if (urlConnection instanceof HttpURLConnection || contentType != null) { in XmlStreamReader()
|
/external/okhttp/repackaged/android/src/main/java/com/android/okhttp/internalandroidapi/ |
D | AndroidResponseCacheAdapter.java | 109 public @Nullable CacheRequest put(@NonNull URI uri, @NonNull URLConnection urlConnection) in put() argument 111 Response okResponse = JavaApiConverter.createOkResponseForCachePut(uri, urlConnection); in put()
|
/external/okhttp/android/src/main/java/com/android/okhttp/internalandroidapi/ |
D | AndroidResponseCacheAdapter.java | 107 public @Nullable CacheRequest put(@NonNull URI uri, @NonNull URLConnection urlConnection) in put() argument 109 Response okResponse = JavaApiConverter.createOkResponseForCachePut(uri, urlConnection); in put()
|
/external/okhttp/mockwebserver/src/test/java/com/squareup/okhttp/mockwebserver/ |
D | MockWebServerTest.java | 160 URLConnection urlConnection = server.getUrl("/").openConnection(); in responseTimeout() local 161 urlConnection.setReadTimeout(1000); in responseTimeout() 162 InputStream in = urlConnection.getInputStream(); in responseTimeout()
|
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/ |
D | ShadowHttpResponseCache.java | 97 protected CacheRequest put(URI uri, URLConnection urlConnection) { in put() argument
|
/external/robolectric/shadows/framework/src/main/java/org/robolectric/shadows/ |
D | ShadowHttpResponseCache.java | 97 protected CacheRequest put(URI uri, URLConnection urlConnection) { in put() argument
|
/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/ |
D | URLConnectionTest.java | 3255 URLConnection urlConnection = client.open(new URL("http://and roid.com/")); 3257 urlConnection.getInputStream(); 3265 URLConnection urlConnection = 3270 urlConnection.getInputStream(); 3277 URLConnection urlConnection = client.open(new URL("http://host\u0000/")); 3279 urlConnection.getInputStream(); 3290 HttpURLConnection urlConnection = client.open(server.getUrl("/")); 3291 assertEquals(302, urlConnection.getResponseCode()); 3292 assertEquals(redirectUrl, urlConnection.getHeaderField("Location")); 3296 URLConnection urlConnection = client.open(new URL("http://host\u0001/")); [all …]
|
/external/okhttp/okhttp-urlconnection/src/test/java/com/squareup/okhttp/ |
D | UrlConnectionCacheTest.java | 223 HttpURLConnection urlConnection = client.open(server.getUrl("/")); in testResponseCaching() local 224 InputStream in = urlConnection.getInputStream(); in testResponseCaching() 225 assertEquals("I love ", readAscii(urlConnection, "I love ".length())); in testResponseCaching() 227 assertEquals("spiders", readAscii(urlConnection, "spiders".length())); in testResponseCaching() 233 urlConnection = client.open(server.getUrl("/")); // cached! in testResponseCaching() 234 in = urlConnection.getInputStream(); in testResponseCaching() 236 readAscii(urlConnection, "I love puppies but hate spiders".length())); in testResponseCaching() 237 assertEquals(200, urlConnection.getResponseCode()); in testResponseCaching() 238 assertEquals("Fantastic", urlConnection.getResponseMessage()); in testResponseCaching()
|
/external/cronet/components/cronet/android/test/javaperftests/src/org/chromium/net/ |
D | CronetPerfTestActivity.java | 270 private boolean exerciseHttpURLConnection(URLConnection urlConnection, byte[] buffer) in exerciseHttpURLConnection() argument 272 final HttpURLConnection connection = (HttpURLConnection) urlConnection; in exerciseHttpURLConnection()
|