Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for Hatch (0.21 sec)

  1. src/test/java/org/codelibs/curl/io/IOIntegrationTest.java

            public void connect(Consumer<HttpURLConnection> actionListener, Consumer<Exception> exceptionListener) {
                try {
                    actionListener.accept(new MockHttpURLConnection(new URL(url)));
                } catch (MalformedURLException e) {
                    exceptionListener.accept(e);
                }
            }
        }
    
        class MockHttpURLConnection extends HttpURLConnection {
    
            MockHttpURLConnection(URL u) {
    Java
    - Registered: Thu May 09 15:34:10 GMT 2024
    - Last Modified: Mon Nov 14 21:05:19 GMT 2022
    - 3.4K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/curl/CurlResponse.java

                    if (length != 0) {
                        baos.write(bytes, 0, length);
                    }
                    length = bis.read(bytes);
                }
                return baos.toString(encoding);
            } catch (final Exception e) {
                throw new CurlException("Failed to access the content.", e);
            }
        }
    
        public InputStream getContentAsStream() throws IOException {
            if (contentCache == null) {
    Java
    - Registered: Thu May 09 15:34:10 GMT 2024
    - Last Modified: Mon Nov 14 21:05:19 GMT 2022
    - 4K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/curl/io/ContentOutputStream.java

                    final File file = super.getFile();
                    if (file != null) {
                        try {
                            Files.deleteIfExists(file.toPath());
                        } catch (final IOException e) {
                            logger.warning(e.getLocalizedMessage());
                        }
                    }
                }
            }
        }
    Java
    - Registered: Thu May 09 15:34:10 GMT 2024
    - Last Modified: Mon Nov 14 21:05:19 GMT 2022
    - 1.9K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/curl/CurlRequest.java

                            IOUtils.copy(bodyStream, out);
                            out.flush();
                        }
                    }
    
                    actionListener.accept(connection);
                } catch (final Exception e) {
                    exceptionListener.accept(new CurlException("Failed to access to " + url, e));
                } finally {
                    if (connection != null) {
                        connection.disconnect();
    Java
    - Registered: Thu May 09 15:34:10 GMT 2024
    - Last Modified: Sun Feb 12 12:21:25 GMT 2023
    - 12.3K bytes
    - Viewed (0)
Back to top