Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for Closed (0.14 sec)

  1. src/main/java/org/codelibs/curl/io/ContentCache.java

            this.data = data;
            this.file = null;
        }
    
        public ContentCache(final File file) {
            this.data = null;
            this.file = file;
        }
    
        @Override
        public void close() throws IOException {
            if (file != null) {
                Files.delete(file.toPath());
            }
        }
    
        public InputStream getInputStream() throws IOException {
            if (file != null) {
    Java
    - Registered: Thu May 09 15:34:10 GMT 2024
    - Last Modified: Mon Nov 14 21:05:19 GMT 2022
    - 1.6K bytes
    - Viewed (1)
  2. src/test/java/org/codelibs/curl/io/IOIntegrationTest.java

            req.execute(res -> {
                logger.info("Processing request. Number of temp files: " + countTmpFiles());
            }, e -> {});
            long after = countTmpFiles();
            logger.info("After close response. Number of temp files: " + after);
    
            // ## Assert ##
            assertEquals(before, after);
        }
    
        private long countTmpFiles() {
    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)
  3. src/main/java/org/codelibs/curl/CurlResponse.java

        private String encoding;
    
        private Exception contentException;
    
        private Map<String, List<String>> headers;
    
        @Override
        public void close() throws IOException {
            if (contentCache != null) {
                contentCache.close();
            }
        }
    
        public <T> T getContent(final Function<CurlResponse, T> parser) {
            return parser.apply(this);
        }
    
    Java
    - Registered: Thu May 09 15:34:10 GMT 2024
    - Last Modified: Mon Nov 14 21:05:19 GMT 2022
    - 4K bytes
    - Viewed (0)
  4. src/test/java/org/codelibs/curl/io/ContentOutputStreamTest.java

            ContentOutputStream cos = new ContentOutputStream(10, Curl.tmpDir);
            cos.write(new byte[] { 0, 1, 2, 3, 4 });
            assertFalse(cos.done);
            assertTrue(cos.isInMemory());
            cos.close();
            assertFalse(cos.done);
        }
    
        @Test
        public void inFile() throws IOException {
            ContentOutputStream cos = new ContentOutputStream(10, Curl.tmpDir);
    Java
    - Registered: Thu May 09 15:34:10 GMT 2024
    - Last Modified: Mon Nov 14 21:05:19 GMT 2022
    - 2K bytes
    - Viewed (0)
  5. src/main/java/org/codelibs/curl/io/ContentOutputStream.java

        }
    
        @Override
        public File getFile() {
            done = true;
            return super.getFile();
        }
    
        @Override
        public void close() throws IOException {
            try {
                super.close();
            } finally {
                if (!isInMemory() && !done) {
                    final File file = super.getFile();
                    if (file != null) {
                        try {
    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)
Back to top